Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ce4272a authored by Masahide NAKAMURA's avatar Masahide NAKAMURA Committed by David S. Miller
Browse files

[IPV6] MIP6: Transformation support mobility header.



Transformation support mobility header.
Based on MIPL2 kernel patch.

Signed-off-by: default avatarMasahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e8f4d48
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -546,6 +546,11 @@ u16 xfrm_flowi_sport(struct flowi *fl)
	case IPPROTO_ICMPV6:
	case IPPROTO_ICMPV6:
		port = htons(fl->fl_icmp_type);
		port = htons(fl->fl_icmp_type);
		break;
		break;
#ifdef CONFIG_IPV6_MIP6
	case IPPROTO_MH:
		port = htons(fl->fl_mh_type);
		break;
#endif
	default:
	default:
		port = 0;	/*XXX*/
		port = 0;	/*XXX*/
	}
	}
+15 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,9 @@
#include <net/ip.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <net/ipv6.h>
#include <net/ip6_route.h>
#include <net/ip6_route.h>
#ifdef CONFIG_IPV6_MIP6
#include <net/mip6.h>
#endif


static struct dst_ops xfrm6_dst_ops;
static struct dst_ops xfrm6_dst_ops;
static struct xfrm_policy_afinfo xfrm6_policy_afinfo;
static struct xfrm_policy_afinfo xfrm6_policy_afinfo;
@@ -270,6 +273,18 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl)
			fl->proto = nexthdr;
			fl->proto = nexthdr;
			return;
			return;


#ifdef CONFIG_IPV6_MIP6
		case IPPROTO_MH:
			if (pskb_may_pull(skb, skb->nh.raw + offset + 3 - skb->data)) {
				struct ip6_mh *mh;
				mh = (struct ip6_mh *)exthdr;

				fl->fl_mh_type = mh->ip6mh_type;
			}
			fl->proto = nexthdr;
			return;
#endif

		/* XXX Why are there these headers? */
		/* XXX Why are there these headers? */
		case IPPROTO_AH:
		case IPPROTO_AH:
		case IPPROTO_ESP:
		case IPPROTO_ESP: