summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasso <hasso>2005-05-26 06:26:40 +0000
committerhasso <hasso>2005-05-26 06:26:40 +0000
commitdc625e86063125f8ecaaa1502c3cf53f44d76eff (patch)
tree243a52620109d888335b26cf8fdf98052b62e801
parentcf96db1cef3e039f3a87c0bc36206b882e804949 (diff)
* rip_routemap.c: In case of '0.0.0.0' used as 'nexthop', use sender
address as nexthop in routemap. Fixes bugzilla #186. [backport candidate]
-rw-r--r--ripd/ChangeLog5
-rw-r--r--ripd/rip_routemap.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 9e787d07..bd487f64 100644
--- a/ripd/ChangeLog
+++ b/ripd/ChangeLog
@@ -1,5 +1,10 @@
2005-05-26 Hasso Tepper <hasso at quagga.net>
+ * rip_routemap.c: In case of '0.0.0.0' used as 'nexthop', use sender
+ address as nexthop in routemap.
+
+2005-05-26 Hasso Tepper <hasso at quagga.net>
+
* rip_routemap.c: Make "match interface" routemap command match both -
in and out interfaces.
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c
index 63d0ccce..275f683e 100644
--- a/ripd/rip_routemap.c
+++ b/ripd/rip_routemap.c
@@ -275,7 +275,7 @@ route_match_ip_next_hop (void *rule, struct prefix *prefix,
{
rinfo = object;
p.family = AF_INET;
- p.prefix = rinfo->nexthop;
+ p.prefix = (rinfo->nexthop.s_addr) ? rinfo->nexthop : rinfo->from;
p.prefixlen = IPV4_MAX_BITLEN;
alist = access_list_lookup (AFI_IP, (char *) rule);
@@ -326,7 +326,7 @@ route_match_ip_next_hop_prefix_list (void *rule, struct prefix *prefix,
{
rinfo = object;
p.family = AF_INET;
- p.prefix = rinfo->nexthop;
+ p.prefix = (rinfo->nexthop.s_addr) ? rinfo->nexthop : rinfo->from;
p.prefixlen = IPV4_MAX_BITLEN;
plist = prefix_list_lookup (AFI_IP, (char *) rule);