|
@@ -1831,8 +1831,8 @@ nla_put_failure:
|
|
return -EMSGSIZE;
|
|
return -EMSGSIZE;
|
|
}
|
|
}
|
|
|
|
|
|
-void inet_netconf_notify_devconf(struct net *net, int type, int ifindex,
|
|
|
|
- struct ipv4_devconf *devconf)
|
|
|
|
|
|
+void inet_netconf_notify_devconf(struct net *net, int event, int type,
|
|
|
|
+ int ifindex, struct ipv4_devconf *devconf)
|
|
{
|
|
{
|
|
struct sk_buff *skb;
|
|
struct sk_buff *skb;
|
|
int err = -ENOBUFS;
|
|
int err = -ENOBUFS;
|
|
@@ -1842,7 +1842,7 @@ void inet_netconf_notify_devconf(struct net *net, int type, int ifindex,
|
|
goto errout;
|
|
goto errout;
|
|
|
|
|
|
err = inet_netconf_fill_devconf(skb, ifindex, devconf, 0, 0,
|
|
err = inet_netconf_fill_devconf(skb, ifindex, devconf, 0, 0,
|
|
- RTM_NEWNETCONF, 0, type);
|
|
|
|
|
|
+ event, 0, type);
|
|
if (err < 0) {
|
|
if (err < 0) {
|
|
/* -EMSGSIZE implies BUG in inet_netconf_msgsize_devconf() */
|
|
/* -EMSGSIZE implies BUG in inet_netconf_msgsize_devconf() */
|
|
WARN_ON(err == -EMSGSIZE);
|
|
WARN_ON(err == -EMSGSIZE);
|
|
@@ -2021,10 +2021,12 @@ static void inet_forward_change(struct net *net)
|
|
|
|
|
|
IPV4_DEVCONF_ALL(net, ACCEPT_REDIRECTS) = !on;
|
|
IPV4_DEVCONF_ALL(net, ACCEPT_REDIRECTS) = !on;
|
|
IPV4_DEVCONF_DFLT(net, FORWARDING) = on;
|
|
IPV4_DEVCONF_DFLT(net, FORWARDING) = on;
|
|
- inet_netconf_notify_devconf(net, NETCONFA_FORWARDING,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_FORWARDING,
|
|
NETCONFA_IFINDEX_ALL,
|
|
NETCONFA_IFINDEX_ALL,
|
|
net->ipv4.devconf_all);
|
|
net->ipv4.devconf_all);
|
|
- inet_netconf_notify_devconf(net, NETCONFA_FORWARDING,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_FORWARDING,
|
|
NETCONFA_IFINDEX_DEFAULT,
|
|
NETCONFA_IFINDEX_DEFAULT,
|
|
net->ipv4.devconf_dflt);
|
|
net->ipv4.devconf_dflt);
|
|
|
|
|
|
@@ -2037,7 +2039,8 @@ static void inet_forward_change(struct net *net)
|
|
in_dev = __in_dev_get_rtnl(dev);
|
|
in_dev = __in_dev_get_rtnl(dev);
|
|
if (in_dev) {
|
|
if (in_dev) {
|
|
IN_DEV_CONF_SET(in_dev, FORWARDING, on);
|
|
IN_DEV_CONF_SET(in_dev, FORWARDING, on);
|
|
- inet_netconf_notify_devconf(net, NETCONFA_FORWARDING,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_FORWARDING,
|
|
dev->ifindex, &in_dev->cnf);
|
|
dev->ifindex, &in_dev->cnf);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2082,19 +2085,22 @@ static int devinet_conf_proc(struct ctl_table *ctl, int write,
|
|
if (i == IPV4_DEVCONF_RP_FILTER - 1 &&
|
|
if (i == IPV4_DEVCONF_RP_FILTER - 1 &&
|
|
new_value != old_value) {
|
|
new_value != old_value) {
|
|
ifindex = devinet_conf_ifindex(net, cnf);
|
|
ifindex = devinet_conf_ifindex(net, cnf);
|
|
- inet_netconf_notify_devconf(net, NETCONFA_RP_FILTER,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_RP_FILTER,
|
|
ifindex, cnf);
|
|
ifindex, cnf);
|
|
}
|
|
}
|
|
if (i == IPV4_DEVCONF_PROXY_ARP - 1 &&
|
|
if (i == IPV4_DEVCONF_PROXY_ARP - 1 &&
|
|
new_value != old_value) {
|
|
new_value != old_value) {
|
|
ifindex = devinet_conf_ifindex(net, cnf);
|
|
ifindex = devinet_conf_ifindex(net, cnf);
|
|
- inet_netconf_notify_devconf(net, NETCONFA_PROXY_NEIGH,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_PROXY_NEIGH,
|
|
ifindex, cnf);
|
|
ifindex, cnf);
|
|
}
|
|
}
|
|
if (i == IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN - 1 &&
|
|
if (i == IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN - 1 &&
|
|
new_value != old_value) {
|
|
new_value != old_value) {
|
|
ifindex = devinet_conf_ifindex(net, cnf);
|
|
ifindex = devinet_conf_ifindex(net, cnf);
|
|
- inet_netconf_notify_devconf(net, NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN,
|
|
ifindex, cnf);
|
|
ifindex, cnf);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2129,7 +2135,7 @@ static int devinet_sysctl_forward(struct ctl_table *ctl, int write,
|
|
container_of(cnf, struct in_device, cnf);
|
|
container_of(cnf, struct in_device, cnf);
|
|
if (*valp)
|
|
if (*valp)
|
|
dev_disable_lro(idev->dev);
|
|
dev_disable_lro(idev->dev);
|
|
- inet_netconf_notify_devconf(net,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
NETCONFA_FORWARDING,
|
|
NETCONFA_FORWARDING,
|
|
idev->dev->ifindex,
|
|
idev->dev->ifindex,
|
|
cnf);
|
|
cnf);
|
|
@@ -2137,7 +2143,8 @@ static int devinet_sysctl_forward(struct ctl_table *ctl, int write,
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
rt_cache_flush(net);
|
|
rt_cache_flush(net);
|
|
} else
|
|
} else
|
|
- inet_netconf_notify_devconf(net, NETCONFA_FORWARDING,
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
|
|
|
|
+ NETCONFA_FORWARDING,
|
|
NETCONFA_IFINDEX_DEFAULT,
|
|
NETCONFA_IFINDEX_DEFAULT,
|
|
net->ipv4.devconf_dflt);
|
|
net->ipv4.devconf_dflt);
|
|
}
|
|
}
|
|
@@ -2259,7 +2266,8 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name,
|
|
|
|
|
|
p->sysctl = t;
|
|
p->sysctl = t;
|
|
|
|
|
|
- inet_netconf_notify_devconf(net, NETCONFA_ALL, ifindex, p);
|
|
|
|
|
|
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF, NETCONFA_ALL,
|
|
|
|
+ ifindex, p);
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
free:
|
|
free:
|