diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2025-08-17 12:09:12 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2025-09-10 08:19:52 +0200 |
commit | 5274cb3ce09c40cccd29ec771ad49a2069aa37c4 (patch) | |
tree | 634d94ede018b6c108a85e30e5f29f1725bf6100 /src/ipcpd/ipcp.c | |
parent | f2a6a1c302a5e962c61857ed4a2f03bd5991b41c (diff) | |
download | ouroboros-5274cb3ce09c40cccd29ec771ad49a2069aa37c4.tar.gz ouroboros-5274cb3ce09c40cccd29ec771ad49a2069aa37c4.zip |
ipcpd: Add ipcpd over UDP/IPv6
This adds an IPCP that runs over UDP/IPv6. It's structured like the
eth-dix and eth-llc in that it builds two separate binaries:
ipcpd-udp4 and ipcpd-udp6. The IRM CLI is backwards compatible in that
type 'udp' will resolve to type 'udp4'.
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.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index a47b6226..62995727 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -74,7 +74,8 @@ static char * ipcp_type_str[] = { "broadcast", "eth-llc", "eth-dix", - "udp" + "udp4", + "udp6" }; static char * dir_hash_str[] = { @@ -228,8 +229,10 @@ static int ipcp_rib_read(const char * path, strcpy(buf, "eth-llc\n"); else if (ipcpd.type == IPCP_ETH_DIX) strcpy(buf, "eth-dix\n"); - else if (ipcpd.type == IPCP_UDP) - strcpy(buf, "udp\n"); + else if (ipcpd.type == IPCP_UDP4) + strcpy(buf, "udp4\n"); + else if (ipcpd.type == IPCP_UDP6) + strcpy(buf, "udp6\n"); else strcpy(buf, "bug\n"); } @@ -455,7 +458,9 @@ static void do_bootstrap(ipcp_config_msg_t * conf_msg, conf = ipcp_config_msg_to_s(conf_msg); switch(conf.type) { /* FIXED algorithms */ - case IPCP_UDP: + case IPCP_UDP4: + /* FALLTHRU */ + case IPCP_UDP6: conf.layer_info.dir_hash_algo = (enum pol_dir_hash) HASH_MD5; break; case IPCP_BROADCAST: |