diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-31 07:53:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-31 07:53:51 -0400 |
commit | ef164ae3563bf4d291b6f75ca2e120b17d606963 (patch) | |
tree | 4b4048121bd4980ed89b89639ac652df85741180 /net/ipv4/raw.c | |
parent | 538de0e01f1ca3568ad03877ff297c646dd8ad23 (diff) |
ipv4: Use flowi4_init_output() in raw_sendmsg()
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 2d3c72e5bbbf..7d32d9d57152 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -548,17 +548,13 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
548 | } | 548 | } |
549 | 549 | ||
550 | { | 550 | { |
551 | struct flowi4 fl4 = { | 551 | struct flowi4 fl4; |
552 | .flowi4_oif = ipc.oif, | 552 | |
553 | .flowi4_mark = sk->sk_mark, | 553 | flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos, |
554 | .daddr = daddr, | 554 | RT_SCOPE_UNIVERSE, |
555 | .saddr = saddr, | 555 | inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol, |
556 | .flowi4_tos = tos, | 556 | FLOWI_FLAG_CAN_SLEEP, daddr, saddr, 0, 0); |
557 | .flowi4_proto = (inet->hdrincl ? | 557 | |
558 | IPPROTO_RAW : | ||
559 | sk->sk_protocol), | ||
560 | .flowi4_flags = FLOWI_FLAG_CAN_SLEEP, | ||
561 | }; | ||
562 | if (!inet->hdrincl) { | 558 | if (!inet->hdrincl) { |
563 | err = raw_probe_proto_opt(&fl4, msg); | 559 | err = raw_probe_proto_opt(&fl4, msg); |
564 | if (err) | 560 | if (err) |