summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-03-16 15:16:21 +0100
committerSander Vrijders <sander@ouroboros.rocks>2019-03-18 11:09:31 +0100
commit8940fe2cc063d2de8393684ff48efec0e27edc8a (patch)
tree934574e25a84f9a486004e7fc30cc35430cc44bf /src/lib
parent7702cb0f44f4cbb31436b2d2c621d4e5b4c0edec (diff)
downloadouroboros-8940fe2cc063d2de8393684ff48efec0e27edc8a.tar.gz
ouroboros-8940fe2cc063d2de8393684ff48efec0e27edc8a.zip
ipcpd: Revise UDP IPCP
The UDP IPCP now uses a fixed server UDP port (default 3435) for all communications. This allows passing firewalls more easily since only a single port needs to be opened. The client port can be fixed as well if needed (default random). It uses an internal eid, so the MTU of the UDP layer is reduced by 4 bytes, similar to the Ethernet IPCPs. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ipcp_config.proto6
-rw-r--r--src/lib/irm.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/ipcp_config.proto b/src/lib/ipcp_config.proto
index f54e78a0..051a3888 100644
--- a/src/lib/ipcp_config.proto
+++ b/src/lib/ipcp_config.proto
@@ -40,10 +40,12 @@ message ipcp_config_msg {
// Config for UDP
optional uint32 ip_addr = 9;
optional uint32 dns_addr = 10;
+ optional uint32 clt_port = 11;
+ optional uint32 srv_port = 12;
// Config for the Ethernet
- optional string dev = 11;
+ optional string dev = 13;
// Config for DIX Ethernet
- optional uint32 ethertype = 12;
+ optional uint32 ethertype = 14;
}
enum enroll_code {
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 28864546..6356443f 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -140,6 +140,10 @@ int irm_bootstrap_ipcp(pid_t pid,
config.ip_addr = conf->ip_addr;
config.has_dns_addr = true;
config.dns_addr = conf->dns_addr;
+ config.has_srv_port = true;
+ config.srv_port = conf->srv_port;
+ config.has_clt_port = true;
+ config.clt_port = conf->clt_port;
break;
case IPCP_LOCAL:
case IPCP_BROADCAST: