summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Osterried <thomas@osterried.de>2012-02-01 01:40:12 +0000
committerThomas Osterried <thomas@osterried.de>2012-02-01 01:40:12 +0000
commitf886db2738a8b351739c84a6c4c44ff0d65a6cd6 (patch)
treebdcc5d193597d5e63e4a861f3486bb3bd7726dd9
parent9c5d19c2d73c437d3ae38ec164aa9beb32e1e306 (diff)
axudp: make "udp <portnumber>" in "route call ip udp port" obsolete; use
the port configured with "socket udp <port>"; but you could still specify another port with "route call ip udp anotherPort".
-rw-r--r--ax25ipd/ax25ipd.conf2
-rw-r--r--ax25ipd/config.c15
2 files changed, 16 insertions, 1 deletions
diff --git a/ax25ipd/ax25ipd.conf b/ax25ipd/ax25ipd.conf
index f849ff6..1c7abf8 100644
--- a/ax25ipd/ax25ipd.conf
+++ b/ax25ipd/ax25ipd.conf
@@ -93,5 +93,7 @@ broadcast QST-0 NODES-0
#route vk2sut-0 44.136.8.68 b
#route vk5xxx 44.136.188.221 b
#route vk2abc 44.1.1.1
+# In case of axudp port 93:
+#route vk2abc 44.1.1.1 udp 93
#
#
diff --git a/ax25ipd/config.c b/ax25ipd/config.c
index f1f4be5..315a243 100644
--- a/ax25ipd/config.c
+++ b/ax25ipd/config.c
@@ -315,9 +315,22 @@ int parse_line(char *buf)
memcpy(tip, (char *) &j, 4);
}
+ if (my_udp)
+ uport = ntohs(my_udp);
while ((q = strtok(NULL, " \t\n\r")) != NULL) {
if (strcmp(q, "udp") == 0) {
- uport = DEFAULT_UDP_PORT;
+ /* uport == 0 should never happen.
+ * re-use setting. It costed me a long time
+ * to realize that "udp" in ax25ipd.conf
+ * is not enough. It used the wrong port;
+ * 93 is standard, I configured socket udp 93,
+ * but ax25ipd talked to partners on that
+ * strange 10093. Even more, ax25ipd.conf's
+ * examples for axip did not help - and the
+ * manual is far from complete.
+ */
+ if (uport == 0)
+ uport = DEFAULT_UDP_PORT;
q = strtok(NULL, " \t\n\r");
if (q != NULL) {
i = atoi(q);