Permalink
Browse files

Add dummy RPL hop-by-hop header handler

Empty RPL hop-by-hop handler has been added. Without handler, all packets
that contain RPL hop-by-hop header are dropped. This prevents multihop
operation.
  • Loading branch information...
mwasilak committed Apr 15, 2015
1 parent b90b292 commit f29c632ef6a6a1777815c97fd2f326faccc704f7
Showing with 20 additions and 0 deletions.
  1. +3 −0 include/uapi/linux/in6.h
  2. +17 −0 net/ipv6/exthdrs.c
View
@@ -143,6 +143,9 @@ struct in6_flowlabel_req {
#define IPV6_TLV_PAD1 0
#define IPV6_TLV_PADN 1
#define IPV6_TLV_ROUTERALERT 5
#ifdef CONFIG_IPV6_RPL
#define IPV6_TLV_RPL 99
#endif
#define IPV6_TLV_JUMBO 194
#define IPV6_TLV_HAO 201 /* home address option */
View
@@ -557,6 +557,17 @@ static bool ipv6_hop_ra(struct sk_buff *skb, int optoff)
return false;
}
#ifdef CONFIG_IPV6_RPL
static bool ipv6_hop_rpl(struct sk_buff *skb, int optoff)
{
/*
* This is a fake RPL hop-by-hop header parser. For DODAG
* root it should be acceptable as a temporary solution.
*/
return true;
}
#endif
/* Jumbo payload */
static bool ipv6_hop_jumbo(struct sk_buff *skb, int optoff)
@@ -608,6 +619,12 @@ static const struct tlvtype_proc tlvprochopopt_lst[] = {
.type = IPV6_TLV_ROUTERALERT,
.func = ipv6_hop_ra,
},
#ifdef CONFIG_IPV6_RPL
{
.type = IPV6_TLV_RPL,
.func = ipv6_hop_rpl,
},
#endif
{
.type = IPV6_TLV_JUMBO,
.func = ipv6_hop_jumbo,

0 comments on commit f29c632

Please sign in to comment.