[NETNS]: Add netns parameter to inet_(dev_)add_type.
The patch extends the inet_addr_type and inet_dev_addr_type with the network namespace pointer. That allows to access the different tables relatively to the network namespace. The modification of the signature function is reported in all the callers of the inet_addr_type using the pointer to the well known init_net. Acked-by: Benjamin Thery <benjamin.thery@bull.net> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8ad4942cd5
commit
6b175b26c1
@@ -1164,7 +1164,7 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
|
||||
if (IN_DEV_SEC_REDIRECTS(in_dev) && ip_fib_check_default(new_gw, dev))
|
||||
goto reject_redirect;
|
||||
} else {
|
||||
if (inet_addr_type(new_gw) != RTN_UNICAST)
|
||||
if (inet_addr_type(&init_net, new_gw) != RTN_UNICAST)
|
||||
goto reject_redirect;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user