Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34576
b: refs/heads/master
c: 280a9d3
h: refs/heads/master
v: v3
  • Loading branch information
Masahide NAKAMURA authored and David S. Miller committed Sep 22, 2006
1 parent 1f35f1b commit 29e7e95
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 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: 65d4ed92219b28875efb52de5700da8c3dfa83e1
refs/heads/master: 280a9d340057ce1b3cca63084df22f4ef5b35fba
11 changes: 7 additions & 4 deletions trunk/net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,10 +648,13 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,

rthdr = (struct ipv6_rt_hdr *)CMSG_DATA(cmsg);

/*
* TYPE 0
*/
if (rthdr->type) {
switch (rthdr->type) {
case IPV6_SRCRT_TYPE_0:
#ifdef CONFIG_IPV6_MIP6
case IPV6_SRCRT_TYPE_2:
#endif
break;
default:
err = -EINVAL;
goto exit_f;
}
Expand Down
10 changes: 9 additions & 1 deletion trunk/net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,16 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
/* routing header option needs extra check */
if (optname == IPV6_RTHDR && opt->srcrt) {
struct ipv6_rt_hdr *rthdr = opt->srcrt;
if (rthdr->type)
switch (rthdr->type) {
case IPV6_SRCRT_TYPE_0:
#ifdef CONFIG_IPV6_MIP6
case IPV6_SRCRT_TYPE_2:
#endif
break;
default:
goto sticky_done;
}

if ((rthdr->hdrlen & 1) ||
(rthdr->hdrlen >> 1) != rthdr->segments_left)
goto sticky_done;
Expand Down

0 comments on commit 29e7e95

Please sign in to comment.