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 =
;
+ 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
= (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
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
@@ 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
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
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
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
@@ -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