diff options
author | Matthieu Boutier <boutier@pps.univ-paris-diderot.fr> | 2016-09-22 23:11:07 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-26 16:52:41 +0200 |
commit | fb23cf4abe0731dce18b8b4cd13d57fcf40d8c5c (patch) | |
tree | 08b1adebfafebc2e04ec28a600c598081c980504 /ripngd | |
parent | ripngd: code simplification for redistribution. (diff) | |
download | frr-fb23cf4abe0731dce18b8b4cd13d57fcf40d8c5c.tar.xz frr-fb23cf4abe0731dce18b8b4cd13d57fcf40d8c5c.zip |
lib: Make distribute.c accepts both v4 and v6.
distribute.c doesn't allow to manage both v4 and v6 distribute lists. This
patch fix this problem by having 4 DISTRIBUTE* values in the enumeration instead
of two. The code in all daemons using distribute.c is adapted.
Diffstat (limited to 'ripngd')
-rw-r--r-- | ripngd/ripngd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 3d76dc525..7d2c66b0b 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -617,7 +617,7 @@ ripng_filter (int ripng_distribute, struct prefix_ipv6 *p, struct access_list *alist; struct prefix_list *plist; int distribute = ripng_distribute == RIPNG_FILTER_OUT ? - DISTRIBUTE_OUT : DISTRIBUTE_IN; + DISTRIBUTE_V6_OUT : DISTRIBUTE_V6_IN; const char *inout = ripng_distribute == RIPNG_FILTER_OUT ? "out" : "in"; /* Input distribute-list filtering. */ @@ -2759,9 +2759,9 @@ ripng_distribute_update (struct distribute *dist) ri = ifp->info; - if (dist->list[DISTRIBUTE_IN]) + if (dist->list[DISTRIBUTE_V6_IN]) { - alist = access_list_lookup (AFI_IP6, dist->list[DISTRIBUTE_IN]); + alist = access_list_lookup (AFI_IP6, dist->list[DISTRIBUTE_V6_IN]); if (alist) ri->list[RIPNG_FILTER_IN] = alist; else @@ -2770,9 +2770,9 @@ ripng_distribute_update (struct distribute *dist) else ri->list[RIPNG_FILTER_IN] = NULL; - if (dist->list[DISTRIBUTE_OUT]) + if (dist->list[DISTRIBUTE_V6_OUT]) { - alist = access_list_lookup (AFI_IP6, dist->list[DISTRIBUTE_OUT]); + alist = access_list_lookup (AFI_IP6, dist->list[DISTRIBUTE_V6_OUT]); if (alist) ri->list[RIPNG_FILTER_OUT] = alist; else @@ -2781,9 +2781,9 @@ ripng_distribute_update (struct distribute *dist) else ri->list[RIPNG_FILTER_OUT] = NULL; - if (dist->prefix[DISTRIBUTE_IN]) + if (dist->prefix[DISTRIBUTE_V6_IN]) { - plist = prefix_list_lookup (AFI_IP6, dist->prefix[DISTRIBUTE_IN]); + plist = prefix_list_lookup (AFI_IP6, dist->prefix[DISTRIBUTE_V6_IN]); if (plist) ri->prefix[RIPNG_FILTER_IN] = plist; else @@ -2792,9 +2792,9 @@ ripng_distribute_update (struct distribute *dist) else ri->prefix[RIPNG_FILTER_IN] = NULL; - if (dist->prefix[DISTRIBUTE_OUT]) + if (dist->prefix[DISTRIBUTE_V6_OUT]) { - plist = prefix_list_lookup (AFI_IP6, dist->prefix[DISTRIBUTE_OUT]); + plist = prefix_list_lookup (AFI_IP6, dist->prefix[DISTRIBUTE_V6_OUT]); if (plist) ri->prefix[RIPNG_FILTER_OUT] = plist; else |