summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ipmr.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2012-12-04 01:13:38 +0000
committerDavid S. Miller <davem@davemloft.net>2012-12-04 13:08:11 -0500
commit9a68ac72a44ecb6d4dc4a7cadf45e1a2cd183885 (patch)
treebbf480f5b1f5a246e5f6f38a0b79dad1a29a7269 /net/ipv4/ipmr.c
parentadfa85e45dac616ff4f8bfceff1621ccafc0b1ff (diff)
downloadop-kernel-dev-9a68ac72a44ecb6d4dc4a7cadf45e1a2cd183885.zip
op-kernel-dev-9a68ac72a44ecb6d4dc4a7cadf45e1a2cd183885.tar.gz
ipmr/ip6mr: report origin of mfc entry into rtnl msg
A mfc entry can be static or not (added via the mroute_sk socket). The patch reports MFC_STATIC flag into rtm_protocol by setting rtm_protocol to RTPROT_STATIC or RTPROT_MROUTED. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r--net/ipv4/ipmr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index c5617d6..91782a7 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -2169,7 +2169,10 @@ static int ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
goto nla_put_failure;
rtm->rtm_type = RTN_MULTICAST;
rtm->rtm_scope = RT_SCOPE_UNIVERSE;
- rtm->rtm_protocol = RTPROT_UNSPEC;
+ if (c->mfc_flags & MFC_STATIC)
+ rtm->rtm_protocol = RTPROT_STATIC;
+ else
+ rtm->rtm_protocol = RTPROT_MROUTED;
rtm->rtm_flags = 0;
if (nla_put_be32(skb, RTA_SRC, c->mfc_origin) ||
OpenPOWER on IntegriCloud