Don't skip point-to-point interfaces if the netmask==0 (the netmask
should be completely ignored for point-to-point interfaces). For point-to-point interfaces, route based on the destination address, not the local address. Submitted by: Peter Wemm
This commit is contained in:
parent
e9ce2e7d20
commit
523a02aa7a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9348
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if.c 8.3 (Berkeley) 1/4/94
|
||||
* $Id: if.c,v 1.15 1995/05/30 08:07:58 rgrimes Exp $
|
||||
* $Id: if.c,v 1.16 1995/06/15 00:19:56 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -237,12 +237,14 @@ ifa_ifwithnet(addr)
|
||||
for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) {
|
||||
register char *cp, *cp2, *cp3;
|
||||
|
||||
if (ifa->ifa_addr->sa_family != af || ifa->ifa_netmask == 0)
|
||||
if (ifa->ifa_addr->sa_family != af)
|
||||
next: continue;
|
||||
if (ifp->if_flags & IFF_POINTOPOINT) {
|
||||
if (equal(addr, ifa->ifa_addr))
|
||||
if (equal(addr, ifa->ifa_dstaddr))
|
||||
return (ifa);
|
||||
} else {
|
||||
if (ifa->ifa_netmask == 0)
|
||||
continue;
|
||||
cp = addr_data;
|
||||
cp2 = ifa->ifa_addr->sa_data;
|
||||
cp3 = ifa->ifa_netmask->sa_data;
|
||||
|
Loading…
Reference in New Issue
Block a user