From 0ae1f0dd600f6c21c34565cf4dc0c5ef0ae42709 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 12 Feb 2020 22:31:18 +0100 Subject: 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 Signed-off-by: Sander Vrijders --- src/tools/irm/irm_ipcp_bootstrap.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/tools/irm') 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 (default: %s)]\n" " [routing (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) -- cgit v1.2.3