From 3e48195a13678d6a798db61ff4b0c737e1ab8707 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 7 Dec 2012 12:32:47 -0500 Subject: [PATCH] --- yaml --- r: 341898 b: refs/heads/master c: 1d9c5a04d5208c6bc53364a513508ffcab1bc338 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/core/dev.c | 2 +- trunk/net/ipv4/route.c | 23 +++++++++++++++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ec303d4aadc8..6fbe1bbeca0d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6699938bde8cf9bc3e118077e84484b7587b8533 +refs/heads/master: 1d9c5a04d5208c6bc53364a513508ffcab1bc338 diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index 0aea3fee7f6d..307142a702d5 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -4971,7 +4971,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) else dev->mtu = new_mtu; - if (!err && dev->flags & IFF_UP) + if (!err) call_netdevice_notifiers(NETDEV_CHANGEMTU, dev); return err; } diff --git a/trunk/net/ipv4/route.c b/trunk/net/ipv4/route.c index baa9b289d7ab..844a9ef60dbd 100644 --- a/trunk/net/ipv4/route.c +++ b/trunk/net/ipv4/route.c @@ -2232,8 +2232,27 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src, error = rt->dst.error; if (rt_is_input_route(rt)) { - if (nla_put_u32(skb, RTA_IIF, rt->rt_iif)) - goto nla_put_failure; +#ifdef CONFIG_IP_MROUTE + if (ipv4_is_multicast(dst) && !ipv4_is_local_multicast(dst) && + IPV4_DEVCONF_ALL(net, MC_FORWARDING)) { + int err = ipmr_get_route(net, skb, + fl4->saddr, fl4->daddr, + r, nowait); + if (err <= 0) { + if (!nowait) { + if (err == 0) + return 0; + goto nla_put_failure; + } else { + if (err == -EMSGSIZE) + goto nla_put_failure; + error = err; + } + } + } else +#endif + if (nla_put_u32(skb, RTA_IIF, rt->rt_iif)) + goto nla_put_failure; } if (rtnl_put_cacheinfo(skb, &rt->dst, 0, expires, error) < 0)