]> git.puffer.fish Git - mirror/frr.git/commitdiff
* rip_routemap.c: In case of '0.0.0.0' used as 'nexthop', use sender
authorhasso <hasso>
Thu, 26 May 2005 06:26:40 +0000 (06:26 +0000)
committerhasso <hasso>
Thu, 26 May 2005 06:26:40 +0000 (06:26 +0000)
  address as nexthop in routemap.

Fixes bugzilla #186. [backport candidate]

ripd/ChangeLog
ripd/rip_routemap.c

index 9e787d075fa1501b4ee084256786b034d9037c3c..bd487f64135b55d64d1a2443a684edaff2cfdc2e 100644 (file)
@@ -1,3 +1,8 @@
+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 -
index 63d0ccce9b89b079843d0c837a881fc4f76d9692..275f683ed7df598ecec67433a0d2b213827494ff 100644 (file)
@@ -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);