From f886db2738a8b351739c84a6c4c44ff0d65a6cd6 Mon Sep 17 00:00:00 2001 From: Thomas Osterried Date: Wed, 1 Feb 2012 01:40:12 +0000 Subject: axudp: make "udp " in "route call ip udp port" obsolete; use the port configured with "socket udp "; but you could still specify another port with "route call ip udp anotherPort". --- ax25ipd/ax25ipd.conf | 2 ++ ax25ipd/config.c | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'ax25ipd') 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); -- cgit v1.2.3