diff options
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index bfec521c717f..a3fe534c968e 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -517,6 +517,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
517 | ipc.addr = inet->inet_saddr; | 517 | ipc.addr = inet->inet_saddr; |
518 | ipc.opt = NULL; | 518 | ipc.opt = NULL; |
519 | ipc.tx_flags = 0; | 519 | ipc.tx_flags = 0; |
520 | ipc.ttl = 0; | ||
521 | ipc.tos = -1; | ||
520 | ipc.oif = sk->sk_bound_dev_if; | 522 | ipc.oif = sk->sk_bound_dev_if; |
521 | 523 | ||
522 | if (msg->msg_controllen) { | 524 | if (msg->msg_controllen) { |
@@ -556,7 +558,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
556 | daddr = ipc.opt->opt.faddr; | 558 | daddr = ipc.opt->opt.faddr; |
557 | } | 559 | } |
558 | } | 560 | } |
559 | tos = RT_CONN_FLAGS(sk); | 561 | tos = get_rtconn_flags(&ipc, sk); |
560 | if (msg->msg_flags & MSG_DONTROUTE) | 562 | if (msg->msg_flags & MSG_DONTROUTE) |
561 | tos |= RTO_ONLINK; | 563 | tos |= RTO_ONLINK; |
562 | 564 | ||