Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8489
b: refs/heads/master
c: e6df439
h: refs/heads/master
i:
  8487: 5681762
v: v3
  • Loading branch information
Brian Haley authored and David S. Miller committed Sep 10, 2005
1 parent 78feac5 commit 16fa969
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3874b98c655b9490bea1cf9c7697d5dc5338376f
refs/heads/master: e6df439b89dbf9eb977c2dc6f7b0644be3704df4
2 changes: 1 addition & 1 deletion trunk/include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct ipv6_opt_hdr {

struct rt0_hdr {
struct ipv6_rt_hdr rt_hdr;
__u32 bitmap; /* strict/loose bit map */
__u32 reserved;
struct in6_addr addr[0];

#define rt0_type rt_hdr.type
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/ipv6/exthdrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,7 @@ ipv6_invert_rthdr(struct sock *sk, struct ipv6_rt_hdr *hdr)

memcpy(opt->srcrt, hdr, sizeof(*hdr));
irthdr = (struct rt0_hdr*)opt->srcrt;
/* Obsolete field, MBZ, when originated by us */
irthdr->bitmap = 0;
irthdr->reserved = 0;
opt->srcrt->segments_left = n;
for (i=0; i<n; i++)
memcpy(irthdr->addr+i, rthdr->addr+(n-1-i), 16);
Expand Down
14 changes: 7 additions & 7 deletions trunk/net/ipv6/netfilter/ip6t_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ match(const struct sk_buff *skb,
((rtinfo->hdrlen == hdrlen) ^
!!(rtinfo->invflags & IP6T_RT_INV_LEN))));
DEBUGP("res %02X %02X %02X ",
(rtinfo->flags & IP6T_RT_RES), ((struct rt0_hdr *)rh)->bitmap,
!((rtinfo->flags & IP6T_RT_RES) && (((struct rt0_hdr *)rh)->bitmap)));
(rtinfo->flags & IP6T_RT_RES), ((struct rt0_hdr *)rh)->reserved,
!((rtinfo->flags & IP6T_RT_RES) && (((struct rt0_hdr *)rh)->reserved)));

ret = (rh != NULL)
&&
Expand All @@ -179,12 +179,12 @@ match(const struct sk_buff *skb,
!!(rtinfo->invflags & IP6T_RT_INV_TYP)));

if (ret && (rtinfo->flags & IP6T_RT_RES)) {
u_int32_t *bp, _bitmap;
bp = skb_header_pointer(skb,
ptr + offsetof(struct rt0_hdr, bitmap),
sizeof(_bitmap), &_bitmap);
u_int32_t *rp, _reserved;
rp = skb_header_pointer(skb,
ptr + offsetof(struct rt0_hdr, reserved),
sizeof(_reserved), &_reserved);

ret = (*bp == 0);
ret = (*rp == 0);
}

DEBUGP("#%d ",rtinfo->addrnr);
Expand Down

0 comments on commit 16fa969

Please sign in to comment.