summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-01-02 14:20:25 +0100
committerSander Vrijders <sander@ouroboros.rocks>2021-01-03 11:59:59 +0100
commit4402f3381b369ae47963ef8936c8f9672697d8db (patch)
tree2faf226c03afc2ca63bbd630ba982c8ad55b3bb3 /src/ipcpd/ipcp.c
parentfa2ca608aa06c98c080edf80c00d39d6d90e4d3a (diff)
downloadouroboros-4402f3381b369ae47963ef8936c8f9672697d8db.tar.gz
ouroboros-4402f3381b369ae47963ef8936c8f9672697d8db.zip
ipcpd: Single UDP port for the ipcpd-udp0.18.0
The UDP layer will now use a single (configurable) UDP port, default 3435. This makes it easer to allocate flows as a client from behind a NAT firewall without having to configure port forwarding rules. So basically, from now on Ouroboros traffic is transported over a bidirectional <src><port>:<dst><port> UDP tunnel. The reason for not using/allowing different client/server ports is that it would require reading from different sockets using select() or something similar, but since we need the EID anyway (mgmt packets arrive on the same server UDP port), there's not a lot of benefit in doing it. Now the operation is similar to the ipcpd-eth, with the port somewhat functioning as a "layer name", where in UDP, the Ethertype functions as a "layer name". Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 7be946dc..838ecda0 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -252,8 +252,7 @@ static void * mainloop(void * o)
case IPCP_UDP:
conf.ip_addr = conf_msg->ip_addr;
conf.dns_addr = conf_msg->dns_addr;
- conf.clt_port = conf_msg->clt_port;
- conf.srv_port = conf_msg->srv_port;
+ conf.port = conf_msg->port;
conf.layer_info.dir_hash_algo = HASH_MD5;
layer_info.dir_hash_algo = HASH_MD5;
break;