summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-01-31 08:55:21 +0000
committerglebius <glebius@FreeBSD.org>2013-01-31 08:55:21 +0000
commit7f832c3059b3b2f864f0b1f3fac0c4ed8e268b27 (patch)
treee3ea2bc458475248ba21882d2e6ebd842532550e /sys/net
parente33dc79d8ee6e651f229bdeddaa7109185cb20db (diff)
downloadFreeBSD-src-7f832c3059b3b2f864f0b1f3fac0c4ed8e268b27.zip
FreeBSD-src-7f832c3059b3b2f864f0b1f3fac0c4ed8e268b27.tar.gz
Retire struct sockaddr_inarp.
Since ARP and routing are separated, "proxy only" entries don't have any meaning, thus we don't need additional field in sockaddr to pass SIN_PROXY flag. New kernel is binary compatible with old tools, since sizes of sockaddr_inarp and sockaddr_in match, and sa_family are filled with same value. The structure declaration is left for compatibility with third party software, but in tree code no longer use it. Reviewed by: ru, andre, net@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_llatbl.c33
-rw-r--r--sys/net/if_llatbl.h1
2 files changed, 5 insertions, 29 deletions
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
index c1c91ba..84ea6c6 100644
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -285,28 +285,8 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info)
switch (rtm->rtm_type) {
case RTM_ADD:
- if (rtm->rtm_flags & RTF_ANNOUNCE) {
+ if (rtm->rtm_flags & RTF_ANNOUNCE)
flags |= LLE_PUB;
-#ifdef INET
- if (dst->sa_family == AF_INET &&
- ((struct sockaddr_inarp *)dst)->sin_other != 0) {
- struct rtentry *rt;
- ((struct sockaddr_inarp *)dst)->sin_other = 0;
- rt = rtalloc1(dst, 0, 0);
- if (rt == NULL || !(rt->rt_flags & RTF_HOST)) {
- log(LOG_INFO, "%s: RTM_ADD publish "
- "(proxy only) is invalid\n",
- __func__);
- if (rt)
- RTFREE_LOCKED(rt);
- return EINVAL;
- }
- RTFREE_LOCKED(rt);
-
- flags |= LLE_PROXY;
- }
-#endif
- }
flags |= LLE_CREATE;
break;
@@ -345,7 +325,7 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info)
* LLE_DELETED flag, and reset the expiration timer
*/
bcopy(LLADDR(dl), &lle->ll_addr, ifp->if_addrlen);
- lle->la_flags |= (flags & (LLE_PUB | LLE_PROXY));
+ lle->la_flags |= (flags & LLE_PUB);
lle->la_flags |= LLE_VALID;
lle->la_flags &= ~LLE_DELETED;
#ifdef INET6
@@ -367,15 +347,12 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info)
laflags = lle->la_flags;
LLE_WUNLOCK(lle);
#ifdef INET
- /* gratuitous ARP */
- if ((laflags & LLE_PUB) && dst->sa_family == AF_INET) {
+ /* gratuitous ARP */
+ if ((laflags & LLE_PUB) && dst->sa_family == AF_INET)
arprequest(ifp,
&((struct sockaddr_in *)dst)->sin_addr,
&((struct sockaddr_in *)dst)->sin_addr,
- ((laflags & LLE_PROXY) ?
- (u_char *)IF_LLADDR(ifp) :
- (u_char *)LLADDR(dl)));
- }
+ (u_char *)LLADDR(dl));
#endif
} else {
if (flags & LLE_EXCLUSIVE)
diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h
index 39ecf7b..693ccd5 100644
--- a/sys/net/if_llatbl.h
+++ b/sys/net/if_llatbl.h
@@ -172,7 +172,6 @@ MALLOC_DECLARE(M_LLTABLE);
#define LLE_STATIC 0x0002 /* entry is static */
#define LLE_IFADDR 0x0004 /* entry is interface addr */
#define LLE_VALID 0x0008 /* ll_addr is valid */
-#define LLE_PROXY 0x0010 /* proxy entry ??? */
#define LLE_PUB 0x0020 /* publish entry ??? */
#define LLE_LINKED 0x0040 /* linked to lookup structure */
#define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */
OpenPOWER on IntegriCloud