diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2020-02-12 22:31:18 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2020-02-16 18:21:41 +0100 |
commit | 0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709 (patch) | |
tree | 023e611cb59e4e14f03adaffa15190c835f80814 /src/tools | |
parent | 71eeedd1a05d5dd200c77527ea15086bf43e1a26 (diff) | |
download | ouroboros-0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709.tar.gz ouroboros-0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709.zip |
ipcpd: Configure PFF from routing policy
The Packet Forwarding Function (PFF) was user-configurable using the
irm tool. However, this isn't really wanted since the PFF is dictated
by the routing algorithm. This moves the responsability for selecting
the correct PFF from the network admin to the unicast IPCP
implementation. Each routing policy now has to specify which PFF it
will use.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/irm/irm_ipcp_bootstrap.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/tools/irm/irm_ipcp_bootstrap.c b/src/tools/irm/irm_ipcp_bootstrap.c index e58a4765..7b844ba7 100644 --- a/src/tools/irm/irm_ipcp_bootstrap.c +++ b/src/tools/irm/irm_ipcp_bootstrap.c @@ -70,7 +70,6 @@ #define DEFAULT_TTL 60 #define DEFAULT_ADDR_AUTH ADDR_AUTH_FLAT_RANDOM #define DEFAULT_ROUTING ROUTING_LINK_STATE -#define DEFAULT_PFF PFF_SIMPLE #define DEFAULT_HASH_ALGO DIR_HASH_SHA3_256 #define DEFAULT_ETHERTYPE 0xA000 #define DEFAULT_CLIENT_PORT 0x0000 /* random port */ @@ -79,8 +78,6 @@ #define FLAT_RANDOM_ADDR_AUTH "flat" #define LINK_STATE_ROUTING "link_state" #define LINK_STATE_LFA_ROUTING "lfa" -#define SIMPLE_PFF "simple" -#define ALTERNATE_PFF "alternate" static void usage(void) { @@ -97,13 +94,11 @@ static void usage(void) " [ttl (max time-to-live value, default: %d)]\n" " [addr_auth <ADDRESS_POLICY> (default: %s)]\n" " [routing <ROUTING_POLICY> (default: %s)]\n" - " [pff [PFF_POLICY] (default: %s)]\n" " [hash [ALGORITHM] (default: %s)]\n" " [autobind]\n" "where ADDRESS_POLICY = {"FLAT_RANDOM_ADDR_AUTH"}\n" " ROUTING_POLICY = {"LINK_STATE_ROUTING " " LINK_STATE_LFA_ROUTING "}\n" - " PFF_POLICY = {" SIMPLE_PFF " " ALTERNATE_PFF "}\n" " ALGORITHM = {" SHA3_224 " " SHA3_256 " " SHA3_384 " " SHA3_512 "}\n\n" "if TYPE == " UDP "\n" @@ -134,7 +129,7 @@ static void usage(void) "if TYPE == " BROADCAST "\n" " [autobind]\n\n", DEFAULT_ADDR_SIZE, DEFAULT_EID_SIZE, DEFAULT_TTL, - FLAT_RANDOM_ADDR_AUTH, LINK_STATE_ROUTING, SIMPLE_PFF, + FLAT_RANDOM_ADDR_AUTH, LINK_STATE_ROUTING, SHA3_256, DEFAULT_SERVER_PORT, SHA3_256, 0xA000, SHA3_256, SHA3_256, SHA3_256); } @@ -150,7 +145,6 @@ int do_bootstrap_ipcp(int argc, uint8_t max_ttl = DEFAULT_TTL; enum pol_addr_auth addr_auth_type = DEFAULT_ADDR_AUTH; enum pol_routing routing_type = DEFAULT_ROUTING; - enum pol_pff pff_type = DEFAULT_PFF; enum pol_dir_hash hash_algo = DEFAULT_HASH_ALGO; uint32_t ip_addr = 0; uint32_t dns_addr = DEFAULT_DDNS; @@ -232,13 +226,6 @@ int do_bootstrap_ipcp(int argc, routing_type = ROUTING_LINK_STATE_LFA; else goto unknown_param; - } else if (matches(*argv, "pff") == 0) { - if (strcmp(SIMPLE_PFF, *(argv + 1)) == 0) - pff_type = PFF_SIMPLE; - else if (strcmp(ALTERNATE_PFF, *(argv + 1)) == 0) - pff_type = PFF_ALTERNATE; - else - goto unknown_param; } else { printf("Unknown option: \"%s\".\n", *argv); return -1; @@ -324,7 +311,6 @@ int do_bootstrap_ipcp(int argc, conf.max_ttl = max_ttl; conf.addr_auth_type = addr_auth_type; conf.routing_type = routing_type; - conf.pff_type = pff_type; break; case IPCP_UDP: if (ip_addr == 0) |