diff options
author | ajs <ajs> | 2005-10-30 23:51:32 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-10-30 23:51:32 +0000 |
commit | 35a60c2d3c217e3b835821a7f6ea458e2eff44cf (patch) | |
tree | ff6dc20fdbf2f081556efaa0edec3ed341b29e97 /ripd/rip_interface.c | |
parent | e5b308d1af147c78acd2803f4006463e6ff67444 (diff) |
2005-10-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripd.c: (rip_response_process) Instead of calling
rip_interface.c:if_valid_neighbor(), call the equivalent
library function if_lookup_address().
* rip_interface.c: (if_valid_neighbor) Remove function, since it is
essentially equivalent to the if_lookup_address() library function.
* ripd.h: (if_valid_neighbor) Remove function declaration.
Diffstat (limited to 'ripd/rip_interface.c')
-rw-r--r-- | ripd/rip_interface.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index 17b25ff8..0bc5a311 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -388,59 +388,6 @@ if_check_address (struct in_addr addr) return 0; } -/* is this address from a valid neighbor? (RFC2453 - Sec. 3.9.2) */ -int -if_valid_neighbor (struct in_addr addr) -{ - struct listnode *node; - struct connected *connected = NULL; - struct interface *ifp; - struct prefix_ipv4 *p; - struct prefix_ipv4 pa; - - pa.family = AF_INET; - pa.prefix = addr; - pa.prefixlen = IPV4_MAX_PREFIXLEN; - - for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) - { - struct listnode *cnode; - - for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, connected)) - { - if (if_is_pointopoint (ifp)) - { - p = (struct prefix_ipv4 *) connected->address; - - if (p && p->family == AF_INET) - { - if (IPV4_ADDR_SAME (&p->prefix, &addr)) - return 1; - - p = (struct prefix_ipv4 *) connected->destination; - if (p) - { - if (IPV4_ADDR_SAME (&p->prefix, &addr)) - return 1; - } - else - { - if (prefix_match(connected->address,(struct prefix *)&pa)) - return 1; - } - } - } - else - { - if ((connected->address->family == AF_INET) && - prefix_match(connected->address,(struct prefix *)&pa)) - return 1; - } - } - } - return 0; -} - /* Inteface link down message processing. */ int rip_interface_down (int command, struct zclient *zclient, zebra_size_t length) |