NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN,
ifindex, cnf);
break;
+ case IPV4_DEVCONF_FORWARDING:
+ if (new == 1) {
+ /* it is safe to use container_of() because forwarding case
+ * is only used by the netlink path
+ */
+ struct in_device *idev = container_of(cnf, struct in_device, cnf);
+
+ netif_disable_lro(idev->dev);
+ }
+
+ inet_netconf_notify_devconf(net, RTM_NEWNETCONF,
+ NETCONFA_FORWARDING,
+ ifindex, cnf);
+ return true;
default:
break;
}
{
struct in_device *in_dev = __in_dev_get_rtnl(dev);
struct nlattr *a, *tb[IFLA_INET_MAX+1];
+ struct net *net = dev_net(dev);
+ bool flush_cache = false;
int rem;
if (!in_dev)
return -EINVAL;
if (tb[IFLA_INET_CONF]) {
- nla_for_each_nested(a, tb[IFLA_INET_CONF], rem)
- ipv4_devconf_set(in_dev, nla_type(a), nla_get_u32(a));
+ nla_for_each_nested(a, tb[IFLA_INET_CONF], rem) {
+ int old_value = ipv4_devconf_get(in_dev, nla_type(a));
+ int new_value = nla_get_u32(a);
+
+ ipv4_devconf_set(in_dev, nla_type(a), new_value);
+ if (devinet_conf_post_set(net, &in_dev->cnf, nla_type(a), new_value,
+ old_value, dev->ifindex))
+ flush_cache = true;
+ }
+ if (flush_cache)
+ rt_cache_flush(net);
}
return 0;