aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 3ccda5ae8a27..bbd604c68e68 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -491,11 +491,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
491 if (msg->msg_namelen < sizeof(*usin)) 491 if (msg->msg_namelen < sizeof(*usin))
492 goto out; 492 goto out;
493 if (usin->sin_family != AF_INET) { 493 if (usin->sin_family != AF_INET) {
494 static int complained; 494 pr_info_once("%s: %s forgot to set AF_INET. Fix it!\n",
495 if (!complained++) 495 __func__, current->comm);
496 printk(KERN_INFO "%s forgot to set AF_INET in "
497 "raw sendmsg. Fix it!\n",
498 current->comm);
499 err = -EAFNOSUPPORT; 496 err = -EAFNOSUPPORT;
500 if (usin->sin_family) 497 if (usin->sin_family)
501 goto out; 498 goto out;
@@ -563,7 +560,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
563 ipc.oif = inet->mc_index; 560 ipc.oif = inet->mc_index;
564 if (!saddr) 561 if (!saddr)
565 saddr = inet->mc_addr; 562 saddr = inet->mc_addr;
566 } 563 } else if (!ipc.oif)
564 ipc.oif = inet->uc_index;
567 565
568 flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos, 566 flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos,
569 RT_SCOPE_UNIVERSE, 567 RT_SCOPE_UNIVERSE,