diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/iovec.c | 6 | ||||
-rw-r--r-- | net/core/neighbour.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/core/iovec.c b/net/core/iovec.c index 827dd6beb49c..e1ec45ab1e63 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c | |||
@@ -39,7 +39,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a | |||
39 | { | 39 | { |
40 | int size, ct, err; | 40 | int size, ct, err; |
41 | 41 | ||
42 | if (m->msg_namelen) { | 42 | if (m->msg_name && m->msg_namelen) { |
43 | if (mode == VERIFY_READ) { | 43 | if (mode == VERIFY_READ) { |
44 | void __user *namep; | 44 | void __user *namep; |
45 | namep = (void __user __force *) m->msg_name; | 45 | namep = (void __user __force *) m->msg_name; |
@@ -48,10 +48,10 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a | |||
48 | if (err < 0) | 48 | if (err < 0) |
49 | return err; | 49 | return err; |
50 | } | 50 | } |
51 | if (m->msg_name) | 51 | m->msg_name = address; |
52 | m->msg_name = address; | ||
53 | } else { | 52 | } else { |
54 | m->msg_name = NULL; | 53 | m->msg_name = NULL; |
54 | m->msg_namelen = 0; | ||
55 | } | 55 | } |
56 | 56 | ||
57 | size = m->msg_iovlen * sizeof(struct iovec); | 57 | size = m->msg_iovlen * sizeof(struct iovec); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 559890b0f0a2..ef31fef25e5a 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2249,7 +2249,7 @@ static int pneigh_fill_info(struct sk_buff *skb, struct pneigh_entry *pn, | |||
2249 | ndm->ndm_pad1 = 0; | 2249 | ndm->ndm_pad1 = 0; |
2250 | ndm->ndm_pad2 = 0; | 2250 | ndm->ndm_pad2 = 0; |
2251 | ndm->ndm_flags = pn->flags | NTF_PROXY; | 2251 | ndm->ndm_flags = pn->flags | NTF_PROXY; |
2252 | ndm->ndm_type = NDA_DST; | 2252 | ndm->ndm_type = RTN_UNICAST; |
2253 | ndm->ndm_ifindex = pn->dev->ifindex; | 2253 | ndm->ndm_ifindex = pn->dev->ifindex; |
2254 | ndm->ndm_state = NUD_NONE; | 2254 | ndm->ndm_state = NUD_NONE; |
2255 | 2255 | ||