ip_sockglue.c (05668381140309088443bf5dc53add4104610fbb) ip_sockglue.c (dc49c1f94e3469d94b952e8f5160dd4ccd791d79)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * The IP to API glue.
7 *
8 * Version: $Id: ip_sockglue.c,v 1.62 2002/02/01 22:01:04 davem Exp $

--- 98 unchanged lines hidden (view full) ---

107 ip_options_undo(opt);
108
109 put_cmsg(msg, SOL_IP, IP_RETOPTS, opt->optlen, opt->__data);
110}
111
112static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb)
113{
114 char *secdata;
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * The IP to API glue.
7 *
8 * Version: $Id: ip_sockglue.c,v 1.62 2002/02/01 22:01:04 davem Exp $

--- 98 unchanged lines hidden (view full) ---

107 ip_options_undo(opt);
108
109 put_cmsg(msg, SOL_IP, IP_RETOPTS, opt->optlen, opt->__data);
110}
111
112static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb)
113{
114 char *secdata;
115 u32 seclen;
115 u32 seclen, secid;
116 int err;
117
116 int err;
117
118 err = security_socket_getpeersec_dgram(skb, &secdata, &seclen);
118 err = security_socket_getpeersec_dgram(NULL, skb, &secid);
119 if (err)
120 return;
121
119 if (err)
120 return;
121
122 err = security_secid_to_secctx(secid, &secdata, &seclen);
123 if (err)
124 return;
125
122 put_cmsg(msg, SOL_IP, SCM_SECURITY, seclen, secdata);
126 put_cmsg(msg, SOL_IP, SCM_SECURITY, seclen, secdata);
127 security_release_secctx(secdata, seclen);
123}
124
125
126void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
127{
128 struct inet_sock *inet = inet_sk(skb->sk);
129 unsigned flags = inet->cmsg_flags;
130

--- 1087 unchanged lines hidden ---
128}
129
130
131void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb)
132{
133 struct inet_sock *inet = inet_sk(skb->sk);
134 unsigned flags = inet->cmsg_flags;
135

--- 1087 unchanged lines hidden ---