summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-24 15:30:27 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-24 15:30:27 -0700
commit7a6adb92fe301c10ca4dbd0d9f2422f5880595e7 (patch)
treeb2b82f828a6eeaa788ee1d378d45e612e4a6d527 /net/ipv4
parentf2c4802b3fdfb0d9596d932ca2af0ef6f8d60491 (diff)
[NETNS]: Add namespace parameter to ip_cmsg_send.
Pass the init_net there for now. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_sockglue.c4
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/udp.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 1b86a50269b..0857f2d042c 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -163,7 +163,7 @@ void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
ip_cmsg_recv_security(msg, skb);
}
-int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc)
+int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc)
{
int err;
struct cmsghdr *cmsg;
@@ -176,7 +176,7 @@ int ip_cmsg_send(struct msghdr *msg, struct ipcm_cookie *ipc)
switch (cmsg->cmsg_type) {
case IP_RETOPTS:
err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr));
- err = ip_options_get(&init_net, &ipc->opt, CMSG_DATA(cmsg), err < 40 ? err : 40);
+ err = ip_options_get(net, &ipc->opt, CMSG_DATA(cmsg), err < 40 ? err : 40);
if (err)
return err;
break;
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index b433b485a88..7d29a05bf88 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -499,7 +499,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
ipc.oif = sk->sk_bound_dev_if;
if (msg->msg_controllen) {
- err = ip_cmsg_send(msg, &ipc);
+ err = ip_cmsg_send(&init_net, msg, &ipc);
if (err)
goto out;
if (ipc.opt)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 9cd48b0bb7d..d142b87e9eb 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -607,7 +607,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
ipc.oif = sk->sk_bound_dev_if;
if (msg->msg_controllen) {
- err = ip_cmsg_send(msg, &ipc);
+ err = ip_cmsg_send(&init_net, msg, &ipc);
if (err)
return err;
if (ipc.opt)