]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
XFRM: Mobility header support.
authorMasahide NAKAMURA <nakam@linux-ipv6.org>
Tue, 5 Dec 2006 10:16:12 +0000 (19:16 +0900)
committerStephen Hemminger <shemminger@osdl.org>
Tue, 5 Dec 2006 18:03:41 +0000 (10:03 -0800)
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
ip/ipxfrm.c
ip/xfrm.h

index 7c9fd0b63721f49d25af13e1141b7b8419023afd..9c8b4bd8d591be3d4cf9bf549ddf8507935878f2 100644 (file)
@@ -483,6 +483,14 @@ void xfrm_selector_print(struct xfrm_selector *sel, __u16 family,
                if (sel->dport_mask)
                        fprintf(fp, "code %u ", ntohs(sel->dport));
                break;
+       case IPPROTO_MH:
+               if (sel->sport_mask)
+                       fprintf(fp, "type %u ", ntohs(sel->sport));
+               if (sel->dport_mask) {
+                       if (show_stats > 0)
+                               fprintf(fp, "(dport) 0x%.4x ", sel->dport);
+               }
+               break;
        }
 
        if (sel->ifindex > 0) {
@@ -1111,6 +1119,7 @@ static int xfrm_selector_upspec_parse(struct xfrm_selector *sel,
                switch (sel->proto) {
                case IPPROTO_ICMP:
                case IPPROTO_ICMPV6:
+               case IPPROTO_MH:
                        break;
                default:
                        fprintf(stderr, "\"type\" and \"code\" are invalid with proto=%s\n", strxf_proto(sel->proto));
index d33ff945dbe2edf088b6540e1ef2295704c68ca9..03db37bf97e7747df9a06b78c6147445609e05aa 100644 (file)
--- a/ip/xfrm.h
+++ b/ip/xfrm.h
@@ -35,6 +35,9 @@
 #ifndef IPPPROTO_DCCP
 # define IPPROTO_DCCP  33
 #endif
+#ifndef IPPROTO_MH
+# define IPPROTO_MH    135
+#endif
 
 #define XFRMS_RTA(x)  ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
 #define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))