Page MenuHomeFreeBSD

D8904.diff
No OneTemporary

D8904.diff

Index: sys/netinet/in.c
===================================================================
--- sys/netinet/in.c
+++ sys/netinet/in.c
@@ -228,7 +228,7 @@
struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr;
struct ifaddr *ifa;
struct in_ifaddr *ia;
- int error;
+ int error, was_up = 0;
if (ifp == NULL)
return (EADDRNOTAVAIL);
@@ -250,9 +250,13 @@
return (error);
case OSIOCAIFADDR: /* 9.x compat */
case SIOCAIFADDR:
+ if (ifp->if_flags & IFF_UP)
+ was_up = 1;
sx_xlock(&in_control_sx);
error = in_aifaddr_ioctl(cmd, data, ifp, td);
sx_xunlock(&in_control_sx);
+ if (!was_up && (ifp->if_flags & IFF_UP))
+ if_up(ifp);
return (error);
case SIOCSIFADDR:
case SIOCSIFBRDADDR:

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 15, 1:24 PM (20 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9091675
Default Alt Text
D8904.diff (729 B)

Event Timeline