diff options
author | qingli <qingli@FreeBSD.org> | 2009-09-15 01:01:03 +0000 |
---|---|---|
committer | qingli <qingli@FreeBSD.org> | 2009-09-15 01:01:03 +0000 |
commit | d073699112113e063b9f1f192a9fa00b3945c8a4 (patch) | |
tree | 3e2fdedb94aa2164e3571cc98d7695a19a289cd5 /sys/netinet/in.c | |
parent | f2066f0140b87790e588ec3ea9e07817b7f04bd2 (diff) | |
download | FreeBSD-src-d073699112113e063b9f1f192a9fa00b3945c8a4.zip FreeBSD-src-d073699112113e063b9f1f192a9fa00b3945c8a4.tar.gz |
The bootp code installs an interface address and the nfs client
module tries to install the same address again. This extra code
is removed, which was discovered by the removal of a call to
in_ifscrub() in r196714. This call to in_ifscrub is put back here
because the SIOCAIFADDR command can be used to change the prefix
length of an existing alias.
Reviewed by: kmacy
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r-- | sys/netinet/in.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index c11b3e7..4a52884 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -536,6 +536,16 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, hostIsNew = 0; } if (ifra->ifra_mask.sin_len) { + /* + * QL: XXX + * Need to scrub the prefix here in case + * the issued command is SIOCAIFADDR with + * the same address, but with a different + * prefix length. And if the prefix length + * is the same as before, then the call is + * un-necessarily executed here. + */ + in_ifscrub(ifp, ia); ia->ia_sockmask = ifra->ifra_mask; ia->ia_sockmask.sin_family = AF_INET; ia->ia_subnetmask = @@ -544,6 +554,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, } if ((ifp->if_flags & IFF_POINTOPOINT) && (ifra->ifra_dstaddr.sin_family == AF_INET)) { + in_ifscrub(ifp, ia); ia->ia_dstaddr = ifra->ifra_dstaddr; maskIsNew = 1; /* We lie; but the effect's the same */ } |