[Bug 235699] Kernel panics when setting IP address if net.link.ether.inet.garp_rexmit_count=2

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 12 18:23:38 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235699

Kristof Provost <kp at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress
                 CC|                            |kp at freebsd.org
           Keywords|                            |panic, patch

--- Comment #1 from Kristof Provost <kp at freebsd.org> ---
That looks like another case of CURVNET not being set.

This should fix it:

diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index f278fa1b3ca..c84fcee3328 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1335,6 +1335,8 @@ garp_rexmit(void *arg)
                return;
        }

+       CURVNET_SET(ia->ia_ifa.ifa_ifp->if_vnet);
+
        /*
         * Drop lock while the ARP request is generated.
         */
@@ -1362,6 +1364,8 @@ garp_rexmit(void *arg)
                        ifa_free(&ia->ia_ifa);
                }
        }
+
+       CURVNET_RESTORE();
 }

 /*

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list