Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300429
b: refs/heads/master
c: b5a4257
h: refs/heads/master
i:
  300427: 849b92e
v: v3
  • Loading branch information
Eldad Zack authored and David S. Miller committed Apr 2, 2012
1 parent f147483 commit 46e00bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: d94d34a0664b296fd1593a96ccc9c97a94dfd43d
refs/heads/master: b5a4257cef5e8d6efb2ac9322b00377279ffd234
10 changes: 4 additions & 6 deletions trunk/net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
sin.sin_port = usin->sin6_port;

err = ip4_datagram_connect(sk,
(struct sockaddr*) &sin,
(struct sockaddr *) &sin,
sizeof(sin));

ipv4_connected:
Expand Down Expand Up @@ -518,7 +518,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
unsigned len;
u8 *ptr = nh + off;

switch(nexthdr) {
switch (nexthdr) {
case IPPROTO_DSTOPTS:
nexthdr = ptr[0];
len = (ptr[1] + 1) << 3;
Expand Down Expand Up @@ -827,9 +827,8 @@ int datagram_send_ctl(struct net *net, struct sock *sk,
int tc;

err = -EINVAL;
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int))) {
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)))
goto exit_f;
}

tc = *(int *)CMSG_DATA(cmsg);
if (tc < -1 || tc > 0xff)
Expand All @@ -846,9 +845,8 @@ int datagram_send_ctl(struct net *net, struct sock *sk,
int df;

err = -EINVAL;
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int))) {
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)))
goto exit_f;
}

df = *(int *)CMSG_DATA(cmsg);
if (df < 0 || df > 1)
Expand Down

0 comments on commit 46e00bc

Please sign in to comment.