Fix one more fallout from r227791: do not overwrite trimmed sa_len
on the ia_sockmask when doing SIOCSIFNETMASK. Reported by: Stefan Bethke <stb lassitu.de>, gonzo Pointy hat to: glebius
This commit is contained in:
parent
64c4a83782
commit
89b9325530
@ -533,7 +533,8 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
|
||||
goto out;
|
||||
|
||||
case SIOCSIFNETMASK:
|
||||
ia->ia_sockmask = *(struct sockaddr_in *)&ifr->ifr_addr;
|
||||
ia->ia_sockmask.sin_addr = ((struct sockaddr_in *)
|
||||
&ifr->ifr_addr)->sin_addr;
|
||||
ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr);
|
||||
goto out;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user