diff options
Diffstat (limited to 'net/ipv4/raw.c')
| -rw-r--r-- | net/ipv4/raw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index bd221ec3f81e..b430cf2a4f66 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
| @@ -38,8 +38,7 @@ | |||
| 38 | * as published by the Free Software Foundation; either version | 38 | * as published by the Free Software Foundation; either version |
| 39 | * 2 of the License, or (at your option) any later version. | 39 | * 2 of the License, or (at your option) any later version. |
| 40 | */ | 40 | */ |
| 41 | 41 | ||
| 42 | #include <linux/config.h> | ||
| 43 | #include <linux/types.h> | 42 | #include <linux/types.h> |
| 44 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
| 45 | #include <asm/byteorder.h> | 44 | #include <asm/byteorder.h> |
| @@ -382,8 +381,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 382 | struct ipcm_cookie ipc; | 381 | struct ipcm_cookie ipc; |
| 383 | struct rtable *rt = NULL; | 382 | struct rtable *rt = NULL; |
| 384 | int free = 0; | 383 | int free = 0; |
| 385 | u32 daddr; | 384 | __be32 daddr; |
| 386 | u32 saddr; | 385 | __be32 saddr; |
| 387 | u8 tos; | 386 | u8 tos; |
| 388 | int err; | 387 | int err; |
| 389 | 388 | ||
| @@ -484,6 +483,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 484 | if (!inet->hdrincl) | 483 | if (!inet->hdrincl) |
| 485 | raw_probe_proto_opt(&fl, msg); | 484 | raw_probe_proto_opt(&fl, msg); |
| 486 | 485 | ||
| 486 | security_sk_classify_flow(sk, &fl); | ||
| 487 | err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); | 487 | err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); |
| 488 | } | 488 | } |
| 489 | if (err) | 489 | if (err) |
| @@ -609,6 +609,7 @@ static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 609 | if (sin) { | 609 | if (sin) { |
| 610 | sin->sin_family = AF_INET; | 610 | sin->sin_family = AF_INET; |
| 611 | sin->sin_addr.s_addr = skb->nh.iph->saddr; | 611 | sin->sin_addr.s_addr = skb->nh.iph->saddr; |
| 612 | sin->sin_port = 0; | ||
| 612 | memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); | 613 | memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); |
| 613 | } | 614 | } |
| 614 | if (inet->cmsg_flags) | 615 | if (inet->cmsg_flags) |
