aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/ipv6.h2
-rw-r--r--net/ipv6/exthdrs.c3
-rw-r--r--net/ipv6/netfilter/ip6t_rt.c14
3 files changed, 9 insertions, 10 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 6c5f7b39a4b0..bb6f88e14061 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -68,7 +68,7 @@ struct ipv6_opt_hdr {
68 68
69struct rt0_hdr { 69struct rt0_hdr {
70 struct ipv6_rt_hdr rt_hdr; 70 struct ipv6_rt_hdr rt_hdr;
71 __u32 bitmap; /* strict/loose bit map */ 71 __u32 reserved;
72 struct in6_addr addr[0]; 72 struct in6_addr addr[0];
73 73
74#define rt0_type rt_hdr.type 74#define rt0_type rt_hdr.type
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 47122728212a..922549581abc 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -406,8 +406,7 @@ ipv6_invert_rthdr(struct sock *sk, struct ipv6_rt_hdr *hdr)
406 406
407 memcpy(opt->srcrt, hdr, sizeof(*hdr)); 407 memcpy(opt->srcrt, hdr, sizeof(*hdr));
408 irthdr = (struct rt0_hdr*)opt->srcrt; 408 irthdr = (struct rt0_hdr*)opt->srcrt;
409 /* Obsolete field, MBZ, when originated by us */ 409 irthdr->reserved = 0;
410 irthdr->bitmap = 0;
411 opt->srcrt->segments_left = n; 410 opt->srcrt->segments_left = n;
412 for (i=0; i<n; i++) 411 for (i=0; i<n; i++)
413 memcpy(irthdr->addr+i, rthdr->addr+(n-1-i), 16); 412 memcpy(irthdr->addr+i, rthdr->addr+(n-1-i), 16);
diff --git a/net/ipv6/netfilter/ip6t_rt.c b/net/ipv6/netfilter/ip6t_rt.c
index a9526b773d28..2bb670037df3 100644
--- a/net/ipv6/netfilter/ip6t_rt.c
+++ b/net/ipv6/netfilter/ip6t_rt.c
@@ -161,8 +161,8 @@ match(const struct sk_buff *skb,
161 ((rtinfo->hdrlen == hdrlen) ^ 161 ((rtinfo->hdrlen == hdrlen) ^
162 !!(rtinfo->invflags & IP6T_RT_INV_LEN)))); 162 !!(rtinfo->invflags & IP6T_RT_INV_LEN))));
163 DEBUGP("res %02X %02X %02X ", 163 DEBUGP("res %02X %02X %02X ",
164 (rtinfo->flags & IP6T_RT_RES), ((struct rt0_hdr *)rh)->bitmap, 164 (rtinfo->flags & IP6T_RT_RES), ((struct rt0_hdr *)rh)->reserved,
165 !((rtinfo->flags & IP6T_RT_RES) && (((struct rt0_hdr *)rh)->bitmap))); 165 !((rtinfo->flags & IP6T_RT_RES) && (((struct rt0_hdr *)rh)->reserved)));
166 166
167 ret = (rh != NULL) 167 ret = (rh != NULL)
168 && 168 &&
@@ -179,12 +179,12 @@ match(const struct sk_buff *skb,
179 !!(rtinfo->invflags & IP6T_RT_INV_TYP))); 179 !!(rtinfo->invflags & IP6T_RT_INV_TYP)));
180 180
181 if (ret && (rtinfo->flags & IP6T_RT_RES)) { 181 if (ret && (rtinfo->flags & IP6T_RT_RES)) {
182 u_int32_t *bp, _bitmap; 182 u_int32_t *rp, _reserved;
183 bp = skb_header_pointer(skb, 183 rp = skb_header_pointer(skb,
184 ptr + offsetof(struct rt0_hdr, bitmap), 184 ptr + offsetof(struct rt0_hdr, reserved),
185 sizeof(_bitmap), &_bitmap); 185 sizeof(_reserved), &_reserved);
186 186
187 ret = (*bp == 0); 187 ret = (*rp == 0);
188 } 188 }
189 189
190 DEBUGP("#%d ",rtinfo->addrnr); 190 DEBUGP("#%d ",rtinfo->addrnr);