diff options
Diffstat (limited to 'sys/netinet/in.c')
| -rw-r--r-- | sys/netinet/in.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index ae8e2f40d3de..1b0a6746e342 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1439,7 +1439,7 @@ in_lltable_dump(struct lltable *llt, struct sysctl_req *wr) struct sockaddr_dl *sdl; /* skip deleted entries */ - if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) + if ((lle->la_flags & LLE_DELETED) == LLE_DELETED) continue; /* Skip if jailed and not a valid IP of the prison. */ if (prison_if(wr->td->td_ucred, L3_ADDR(lle)) != 0) @@ -1471,10 +1471,15 @@ in_lltable_dump(struct lltable *llt, struct sysctl_req *wr) sdl = &arpc.sdl; sdl->sdl_family = AF_LINK; sdl->sdl_len = sizeof(*sdl); - sdl->sdl_alen = ifp->if_addrlen; sdl->sdl_index = ifp->if_index; sdl->sdl_type = ifp->if_type; - bcopy(&lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); + if ((lle->la_flags & LLE_VALID) == LLE_VALID) { + sdl->sdl_alen = ifp->if_addrlen; + bcopy(&lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); + } else { + sdl->sdl_alen = 0; + bzero(LLADDR(sdl), ifp->if_addrlen); + } arpc.rtm.rtm_rmx.rmx_expire = lle->la_flags & LLE_STATIC ? 0 : lle->la_expire; |
