projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SK_BUFF]: Introduce skb_reset_transport_header(skb)
[deliverable/linux.git]
/
net
/
ipv4
/
af_inet.c
diff --git
a/net/ipv4/af_inet.c
b/net/ipv4/af_inet.c
index cf358c84c44060353b69b5ef26129f8a9cb2a266..f011390f19c914764e62b98a0f6c131417abf579 100644
(file)
--- a/
net/ipv4/af_inet.c
+++ b/
net/ipv4/af_inet.c
@@
-755,6
+755,9
@@
int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCGSTAMP:
err = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
case SIOCGSTAMP:
err = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
+ case SIOCGSTAMPNS:
+ err = sock_get_timestampns(sk, (struct timespec __user *)arg);
+ break;
case SIOCADDRT:
case SIOCDELRT:
case SIOCRTMSG:
case SIOCADDRT:
case SIOCDELRT:
case SIOCRTMSG:
@@
-1109,7
+1112,7
@@
static int inet_gso_send_check(struct sk_buff *skb)
if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
goto out;
if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
goto out;
- iph =
skb->nh.iph
;
+ iph =
ip_hdr(skb)
;
ihl = iph->ihl * 4;
if (ihl < sizeof(*iph))
goto out;
ihl = iph->ihl * 4;
if (ihl < sizeof(*iph))
goto out;
@@
-1117,8
+1120,9
@@
static int inet_gso_send_check(struct sk_buff *skb)
if (unlikely(!pskb_may_pull(skb, ihl)))
goto out;
if (unlikely(!pskb_may_pull(skb, ihl)))
goto out;
- skb->h.raw = __skb_pull(skb, ihl);
- iph = skb->nh.iph;
+ __skb_pull(skb, ihl);
+ skb_reset_transport_header(skb);
+ iph = ip_hdr(skb);
proto = iph->protocol & (MAX_INET_PROTOS - 1);
err = -EPROTONOSUPPORT;
proto = iph->protocol & (MAX_INET_PROTOS - 1);
err = -EPROTONOSUPPORT;
@@
-1152,7
+1156,7
@@
static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
goto out;
if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
goto out;
- iph =
skb->nh.iph
;
+ iph =
ip_hdr(skb)
;
ihl = iph->ihl * 4;
if (ihl < sizeof(*iph))
goto out;
ihl = iph->ihl * 4;
if (ihl < sizeof(*iph))
goto out;
@@
-1160,8
+1164,9
@@
static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
if (unlikely(!pskb_may_pull(skb, ihl)))
goto out;
if (unlikely(!pskb_may_pull(skb, ihl)))
goto out;
- skb->h.raw = __skb_pull(skb, ihl);
- iph = skb->nh.iph;
+ __skb_pull(skb, ihl);
+ skb_reset_transport_header(skb);
+ iph = ip_hdr(skb);
id = ntohs(iph->id);
proto = iph->protocol & (MAX_INET_PROTOS - 1);
segs = ERR_PTR(-EPROTONOSUPPORT);
id = ntohs(iph->id);
proto = iph->protocol & (MAX_INET_PROTOS - 1);
segs = ERR_PTR(-EPROTONOSUPPORT);
@@
-1177,11
+1182,11
@@
static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
skb = segs;
do {
skb = segs;
do {
- iph =
skb->nh.iph
;
+ iph =
ip_hdr(skb)
;
iph->id = htons(id++);
iph->tot_len = htons(skb->len - skb->mac_len);
iph->check = 0;
iph->id = htons(id++);
iph->tot_len = htons(skb->len - skb->mac_len);
iph->check = 0;
- iph->check = ip_fast_csum(skb
->nh.raw
, iph->ihl);
+ iph->check = ip_fast_csum(skb
_network_header(skb)
, iph->ihl);
} while ((skb = skb->next));
out:
} while ((skb = skb->next));
out:
@@
-1336,7
+1341,7
@@
static int __init inet_init(void)
* Initialise per-cpu ipv4 mibs
*/
* Initialise per-cpu ipv4 mibs
*/
- if(init_ipv4_mibs())
+ if
(init_ipv4_mibs())
printk(KERN_CRIT "inet_init: Cannot init ipv4 mibs\n"); ;
ipv4_proc_init();
printk(KERN_CRIT "inet_init: Cannot init ipv4 mibs\n"); ;
ipv4_proc_init();
This page took
0.029067 seconds
and
5
git commands to generate.