From 2c7e3030edb84abae14042f7a1a22b44255324be Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 20 Sep 2017 13:56:17 +0200 Subject: ipcpd: normal: Make PFF policy-based This turns the PDU Forwarding Function of the IPCP into a policy. For now only the simple PFF policy is available. --- src/ipcpd/normal/addr_auth.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/ipcpd/normal/addr_auth.c') diff --git a/src/ipcpd/normal/addr_auth.c b/src/ipcpd/normal/addr_auth.c index e4aacccd..c7c744c7 100644 --- a/src/ipcpd/normal/addr_auth.c +++ b/src/ipcpd/normal/addr_auth.c @@ -29,33 +29,30 @@ #include "pol/flat.h" #include -#include -struct addr_auth { - struct pol_addr_auth_ops * ops; -} addr_auth; +struct pol_addr_auth_ops * ops; int addr_auth_init(enum pol_addr_auth type, const void * info) { switch (type) { case FLAT_RANDOM: - addr_auth.ops = &flat_ops; + ops = &flat_ops; break; default: log_err("Unknown address authority type."); return -1; } - return addr_auth.ops->init(info); + return ops->init(info); } uint64_t addr_auth_address(void) { - return addr_auth.ops->address(); + return ops->address(); } int addr_auth_fini(void) { - return addr_auth.ops->fini(); + return ops->fini(); } -- cgit v1.2.3