FreeBSD Bugzilla – Attachment 105009 Details for
Bug 145300
[arp] ARP table mapping is not refreshed on a MAC address change
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 955 bytes, created by
Boris Astardzhiev
on 2010-04-02 18:00:13 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Boris Astardzhiev
Created:
2010-04-02 18:00:13 UTC
Size:
955 bytes
patch
obsolete
>--- usr/src/sys/net/if.c 2010-04-02 19:15:39.000000000 +0300 >+++ /usr/src/sys/net/if.c 2010-04-02 19:16:57.000000000 +0300 >@@ -142,6 +142,11 @@ > static void if_attach_internal(struct ifnet *, int); > static void if_detach_internal(struct ifnet *, int); > >+#ifdef INET >+/* XXX: better way to grab access to this function? */ >+extern void arp_ifscrub(struct ifnet *ifp, uint32_t addr); >+#endif /* INET */ >+ > #ifdef INET6 > /* > * XXX: declare here to avoid to include many inet6 related files.. >@@ -3197,8 +3202,14 @@ > * the address change. > */ > TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { >- if (ifa->ifa_addr->sa_family == AF_INET) >+ if (ifa->ifa_addr->sa_family == AF_INET) { >+ struct in_ifaddr *ia = (struct in_ifaddr *)ifa; >+ >+ /* Delete previous mappings in the ARP table >+ * first then send a gratuitous ARP */ >+ arp_ifscrub(ifp, (uint32_t)(IA_SIN(ia)->sin_addr.s_addr)); > arp_ifinit(ifp, ifa); >+ } > } > #endif > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145300
: 105009