Re: splnet() and SIOCSIFADDR

2014-10-03 Thread Alexander Bluhm
On Thu, Sep 11, 2014 at 10:49:33AM +0200, Martin Pieuchot wrote: --- netinet6/in6.c26 Aug 2014 21:44:29 - 1.140 +++ netinet6/in6.c11 Sep 2014 08:45:29 - @@ -561,8 +560,10 @@ in6_control(struct socket *so, u_long cm } case SIOCDIFADDR_IN6: + s =

Re: splnet() and SIOCSIFADDR

2014-09-30 Thread Martin Pieuchot
; + int error = 0; switch (cmd) { case SIOCSIFADDR: - s = splnet(); ifp-if_flags |= IFF_RUNNING; if_up(ifp); /* send up RTM_IFINFO */ - splx(s); ifa = (struct ifaddr *)data

Re: splnet() and SIOCSIFADDR

2014-09-11 Thread Martin Pieuchot
= (struct ifreq *)addr; struct ifnet *cdev = NULL; - int i, error = 0; + int s, i, error = 0; switch (cmd) { case SIOCSIFADDR: + s = splnet(); switch (ifa-ifa_addr-sa_family) { #ifdef INET case AF_INET: @@ -2087,6

Re: splnet() and SIOCSIFADDR

2014-09-11 Thread Martin Pieuchot
On 03/09/14(Wed) 23:59, Claudio Jeker wrote: On Wed, Sep 03, 2014 at 03:25:34PM +0200, Martin Pieuchot wrote: Drivers that need a splnet() protection inside their SIOCSIFADDR generally raise the spl level themselves, so we should not need to do that in in{6,}_ifinit(). One exception to

splnet() and SIOCSIFADDR

2014-09-03 Thread Martin Pieuchot
@@ carp_ioctl(struct ifnet *ifp, u_long cmd struct ifaddr *ifa = (struct ifaddr *)addr; struct ifreq *ifr = (struct ifreq *)addr; struct ifnet *cdev = NULL; - int i, error = 0; + int s, i, error = 0; switch (cmd) { case SIOCSIFADDR

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Martin Pieuchot
ifreq *)addr; struct ifnet *cdev = NULL; - int i, error = 0; + int s, i, error = 0; switch (cmd) { case SIOCSIFADDR: + s = splnet(); switch (ifa-ifa_addr-sa_family) { #ifdef INET case AF_INET: @@ -2088,6 +2089,7

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Mike Belopuhov
On 3 September 2014 15:53, Martin Pieuchot mpieuc...@nolizard.org wrote: On 03/09/14(Wed) 15:25, Martin Pieuchot wrote: Drivers that need a splnet() protection inside their SIOCSIFADDR generally raise the spl level themselves, so we should not need to do that in in{6,}_ifinit(). One exception

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Alexander Bluhm
On Wed, Sep 03, 2014 at 03:53:34PM +0200, Martin Pieuchot wrote: @@ -1078,7 +1079,7 @@ in6_purgeaddr(struct ifaddr *ifa) void in6_unlink_ifa(struct in6_ifaddr *ia6, struct ifnet *ifp) { - int s = splnet(); + splsoftassert(IPL_SOFTNET); ifa_del(ifp, ia6-ia_ifa); I

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Claudio Jeker
@@ -2060,10 +2060,11 @@ carp_ioctl(struct ifnet *ifp, u_long cmd struct ifaddr *ifa = (struct ifaddr *)addr; struct ifreq *ifr = (struct ifreq *)addr; struct ifnet *cdev = NULL; - int i, error = 0; + int s, i, error = 0; switch (cmd) { case SIOCSIFADDR