aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/uapi/linux/rtnetlink.h1
-rw-r--r--net/ipv4/ipmr.c5
-rw-r--r--net/ipv6/ip6mr.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 80abe27dc2a7..33d29cea37ea 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -227,6 +227,7 @@ enum {
227#define RTPROT_XORP 14 /* XORP */ 227#define RTPROT_XORP 14 /* XORP */
228#define RTPROT_NTK 15 /* Netsukuku */ 228#define RTPROT_NTK 15 /* Netsukuku */
229#define RTPROT_DHCP 16 /* DHCP client */ 229#define RTPROT_DHCP 16 /* DHCP client */
230#define RTPROT_MROUTED 17 /* Multicast daemon */
230 231
231/* rtm_scope 232/* rtm_scope
232 233
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index c5617d646b93..91782a7634c2 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,
2169 goto nla_put_failure; 2169 goto nla_put_failure;
2170 rtm->rtm_type = RTN_MULTICAST; 2170 rtm->rtm_type = RTN_MULTICAST;
2171 rtm->rtm_scope = RT_SCOPE_UNIVERSE; 2171 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
2172 rtm->rtm_protocol = RTPROT_UNSPEC; 2172 if (c->mfc_flags & MFC_STATIC)
2173 rtm->rtm_protocol = RTPROT_STATIC;
2174 else
2175 rtm->rtm_protocol = RTPROT_MROUTED;
2173 rtm->rtm_flags = 0; 2176 rtm->rtm_flags = 0;
2174 2177
2175 if (nla_put_be32(skb, RTA_SRC, c->mfc_origin) || 2178 if (nla_put_be32(skb, RTA_SRC, c->mfc_origin) ||
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 4220a7b93386..d51b91122866 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -2249,7 +2249,10 @@ static int ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb,
2249 if (nla_put_u32(skb, RTA_TABLE, mrt->id)) 2249 if (nla_put_u32(skb, RTA_TABLE, mrt->id))
2250 goto nla_put_failure; 2250 goto nla_put_failure;
2251 rtm->rtm_scope = RT_SCOPE_UNIVERSE; 2251 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
2252 rtm->rtm_protocol = RTPROT_UNSPEC; 2252 if (c->mfc_flags & MFC_STATIC)
2253 rtm->rtm_protocol = RTPROT_STATIC;
2254 else
2255 rtm->rtm_protocol = RTPROT_MROUTED;
2253 rtm->rtm_flags = 0; 2256 rtm->rtm_flags = 0;
2254 2257
2255 if (nla_put(skb, RTA_SRC, 16, &c->mf6c_origin) || 2258 if (nla_put(skb, RTA_SRC, 16, &c->mf6c_origin) ||