diff options
author | qingli <qingli@FreeBSD.org> | 2010-05-25 20:42:35 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2010-05-25 20:42:35 +0000 |
commit | f6ab4a681092467819a08db78ce8d607027932f3 (patch) | |
tree | 77dc5f4f28833bfa251750d8664af39e70979adf /sys/netinet | |
parent | fd1b90e890d4acaa91139d5635282fcd1406eeec (diff) | |
download | FreeBSD-src-f6ab4a681092467819a08db78ce8d607027932f3.zip FreeBSD-src-f6ab4a681092467819a08db78ce8d607027932f3.tar.gz |
This patch fixes the problem where proxy ARP entries cannot be added
over the if_ng interface.
MFC after: 3 days
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in.c | 5 | ||||
-rw-r--r-- | sys/netinet/in_pcb.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_options.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 96bfa0e..db7c8fe 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1379,8 +1379,9 @@ in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr /* XXX rtalloc1 should take a const param */ rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0); - if (rt == NULL || (rt->rt_flags & RTF_GATEWAY) || - ((rt->rt_ifp != ifp) && !(flags & LLE_PUB))) { + if (rt == NULL || (!(flags & LLE_PUB) && + ((rt->rt_flags & RTF_GATEWAY) || + (rt->rt_ifp != ifp)))) { #ifdef DIAGNOSTIC log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n", inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr)); diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 8a291e4..ae5354e 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -631,7 +631,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr, ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin)); if (ia == NULL) - ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin)); + ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0)); if (ia == NULL) { error = ENETUNREACH; goto done; @@ -748,7 +748,7 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr, ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain))); if (ia == NULL) - ia = ifatoia(ifa_ifwithnet(sintosa(&sain))); + ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0)); if (ia == NULL) ia = ifatoia(ifa_ifwithaddr(sintosa(&sain))); diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c index 50dcff6..a7afbfd 100644 --- a/sys/netinet/ip_options.c +++ b/sys/netinet/ip_options.c @@ -228,7 +228,7 @@ dropit: #define INA struct in_ifaddr * #define SA struct sockaddr * if ((ia = (INA)ifa_ifwithdstaddr((SA)&ipaddr)) == NULL) - ia = (INA)ifa_ifwithnet((SA)&ipaddr); + ia = (INA)ifa_ifwithnet((SA)&ipaddr, 0); } else /* XXX MRT 0 for routing */ ia = ip_rtaddr(ipaddr.sin_addr, M_GETFIB(m)); diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index dc26705..1a933c5 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -244,7 +244,7 @@ again: isbroadcast = 1; } else if (flags & IP_ROUTETOIF) { if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst)))) == NULL && - (ia = ifatoia(ifa_ifwithnet(sintosa(dst)))) == NULL) { + (ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0))) == NULL) { IPSTAT_INC(ips_noroute); error = ENETUNREACH; goto bad; |