Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112223
b: refs/heads/master
c: 64194c3
h: refs/heads/master
i:
  112221: 2134fac
  112219: 1e86cce
  112215: d358039
  112207: 85c6a3a
  112191: 18889ac
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Oct 9, 2008
1 parent a7d33cb commit 06ccbaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1a8000228e16212c93b23cfbed4d622e2ec7a6b
refs/heads/master: 64194c31a0b6f5d84703b772113aafc400eeaad6
2 changes: 1 addition & 1 deletion trunk/include/net/ipip.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct ip_tunnel_prl_entry

#define IPTUNNEL_XMIT() do { \
int err; \
int pkt_len = skb->len; \
int pkt_len = skb->len - skb_transport_offset(skb); \
\
skb->ip_summed = CHECKSUM_NONE; \
ip_select_ident(iph, &rt->u.dst, NULL); \
Expand Down
7 changes: 5 additions & 2 deletions trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ static int ipgre_rcv(struct sk_buff *skb)
struct ip_tunnel *tunnel;
int offset = 4;
__be16 gre_proto;
unsigned int len;

if (!pskb_may_pull(skb, 16))
goto drop_nolock;
Expand Down Expand Up @@ -567,6 +568,8 @@ static int ipgre_rcv(struct sk_buff *skb)
tunnel->i_seqno = seqno + 1;
}

len = skb->len;

/* Warning: All skb pointers will be invalidated! */
if (tunnel->dev->type == ARPHRD_ETHER) {
if (!pskb_may_pull(skb, ETH_HLEN)) {
Expand All @@ -581,7 +584,7 @@ static int ipgre_rcv(struct sk_buff *skb)
}

stats->rx_packets++;
stats->rx_bytes += skb->len;
stats->rx_bytes += len;
skb->dev = tunnel->dev;
dst_release(skb->dst);
skb->dst = NULL;
Expand Down Expand Up @@ -770,7 +773,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
old_iph = ip_hdr(skb);
}

skb->transport_header = skb->network_header;
skb_reset_transport_header(skb);
skb_push(skb, gre_hlen);
skb_reset_network_header(skb);
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
Expand Down

0 comments on commit 06ccbaf

Please sign in to comment.