diff options
author | wollman <wollman@FreeBSD.org> | 1996-12-17 21:07:05 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1996-12-17 21:07:05 +0000 |
commit | 9efe665f63a16504b30b113d5affb49909c96542 (patch) | |
tree | be0c5a148431d4db06ba19cbc8fb612357d6e46b /sbin/routed/input.c | |
parent | 83f39a352fd47b026ef54bebe526949cf5b76367 (diff) | |
download | FreeBSD-src-9efe665f63a16504b30b113d5affb49909c96542.zip FreeBSD-src-9efe665f63a16504b30b113d5affb49909c96542.tar.gz |
Latest routed from Vern Schryver. This is supposed to fix
Andrey's rtquery problem.
Submitted by: Vernon J. Schryver <vjs@mica.denver.sgi.com>
Diffstat (limited to 'sbin/routed/input.c')
-rw-r--r-- | sbin/routed/input.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/sbin/routed/input.c b/sbin/routed/input.c index fb5dbf5..100bd3d 100644 --- a/sbin/routed/input.c +++ b/sbin/routed/input.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 6/5/93"; #elif defined(__NetBSD__) static char rcsid[] = "$NetBSD$"; #endif -#ident "$Revision: 1.19 $" +#ident "$Revision: 1.20 $" #include "defs.h" @@ -103,26 +103,20 @@ read_rip(int sock, if (aifp == 0) { aifp = ifwithname(inbuf.ifname, 0); if (aifp == 0) { - /* maybe it is a new interface */ - ifinit(); - aifp = ifwithname(inbuf.ifname, 0); - if (aifp == 0) { - msglim(&bad_name, from.sin_addr.s_addr, - "impossible interface name" - " %.*s", IFNAMSIZ, - inbuf.ifname); - } - } - - /* If it came via the wrong interface, do not - * trust it. - */ - if (((aifp->int_if_flags & IFF_POINTOPOINT) - && aifp->int_dstaddr != from.sin_addr.s_addr) - || (!(aifp->int_if_flags & IFF_POINTOPOINT) - && !on_net(from.sin_addr.s_addr, - aifp->int_net, aifp->int_mask))) + msglim(&bad_name, from.sin_addr.s_addr, + "impossible interface name %.*s", + IFNAMSIZ, inbuf.ifname); + } else if (((aifp->int_if_flags & IFF_POINTOPOINT) + && aifp->int_dstaddr!=from.sin_addr.s_addr) + || (!(aifp->int_if_flags & IFF_POINTOPOINT) + && !on_net(from.sin_addr.s_addr, + aifp->int_net, + aifp->int_mask))) { + /* If it came via the wrong interface, do not + * trust it. + */ aifp = 0; + } } #else aifp = iflookup(from.sin_addr.s_addr); |