]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
iproute2: add support of flag XFRM_STATE_ALIGN4
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 1 Feb 2011 12:29:54 +0000 (07:29 -0500)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Wed, 2 Mar 2011 19:50:09 +0000 (11:50 -0800)
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip/ipxfrm.c
ip/xfrm_state.c

index a276c0b845568ae3db6d7b674baf7d2ee3a774d2..0c7aaad872a7b9906fbb1924c6bf74eea67bd33d 100644 (file)
@@ -854,6 +854,7 @@ void xfrm_state_info_print(struct xfrm_usersa_info *xsinfo,
                XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_WILDRECV, "wildrecv");
                XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_ICMP, "icmp");
                XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_AF_UNSPEC, "af-unspec");
+               XFRM_FLAG_PRINT(fp, flags, XFRM_STATE_ALIGN4, "align4");
                if (flags)
                        fprintf(fp, "%x", flags);
        }
index 94acd66b0233e5138e8b6adaf440b96c74a207a0..8ac3437a25d8b5dfd8bd10de9a9dd698c6a640ab 100644 (file)
@@ -84,7 +84,7 @@ static void usage(void)
        //fprintf(stderr, "REQID - number(default=0)\n");
 
        fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n");
-       fprintf(stderr, "FLAG := [ noecn | decap-dscp | nopmtudisc | wildrecv | icmp | af-unspec ]\n");
+       fprintf(stderr, "FLAG := [ noecn | decap-dscp | nopmtudisc | wildrecv | icmp | af-unspec | align4 ]\n");
 
         fprintf(stderr, "ENCAP := ENCAP-TYPE SPORT DPORT OADDR\n");
         fprintf(stderr, "ENCAP-TYPE := espinudp | espinudp-nonike\n");
@@ -216,6 +216,8 @@ static int xfrm_state_flag_parse(__u8 *flags, int *argcp, char ***argvp)
                                *flags |= XFRM_STATE_ICMP;
                        else if (strcmp(*argv, "af-unspec") == 0)
                                *flags |= XFRM_STATE_AF_UNSPEC;
+                       else if (strcmp(*argv, "align4") == 0)
+                               *flags |= XFRM_STATE_ALIGN4;
                        else {
                                PREV_ARG(); /* back track */
                                break;