diff options
author | Thomas Osterried <thomas@osterried.de> | 2012-02-01 01:40:12 +0000 |
---|---|---|
committer | Thomas Osterried <thomas@osterried.de> | 2012-02-01 01:40:12 +0000 |
commit | f886db2738a8b351739c84a6c4c44ff0d65a6cd6 (patch) | |
tree | bdcc5d193597d5e63e4a861f3486bb3bd7726dd9 /ax25ipd/config.c | |
parent | 9c5d19c2d73c437d3ae38ec164aa9beb32e1e306 (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".
Diffstat (limited to 'ax25ipd/config.c')
-rw-r--r-- | ax25ipd/config.c | 15 |
1 files changed, 14 insertions, 1 deletions
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); |