Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314961
b: refs/heads/master
c: 1160472
h: refs/heads/master
i:
  314959: 44524ec
v: v3
  • Loading branch information
David S. Miller committed Jul 4, 2012
1 parent e9c258a commit 30ddf76
Show file tree
Hide file tree
Showing 2 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: e87183c2b5ab1f55ebad2f260a7eb4d31549ce25
refs/heads/master: 11604721a3c4bea60e2ddd9e4e30d741ecdba7b0
9 changes: 6 additions & 3 deletions trunk/net/ipv4/ip_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,15 @@ int ip_options_compile(struct net *net,
{
__be32 spec_dst = (__force __be32) 0;
unsigned char *pp_ptr = NULL;
struct rtable *rt = NULL;
unsigned char *optptr;
unsigned char *iph;
int optlen, l;

if (skb != NULL) {
spec_dst = fib_compute_spec_dst(skb);
rt = skb_rtable(skb);
if (rt)
spec_dst = fib_compute_spec_dst(skb);
optptr = (unsigned char *)&(ip_hdr(skb)[1]);
} else
optptr = opt->__data;
Expand Down Expand Up @@ -330,7 +333,7 @@ int ip_options_compile(struct net *net,
pp_ptr = optptr + 2;
goto error;
}
if (skb) {
if (rt) {
memcpy(&optptr[optptr[2]-1], &spec_dst, 4);
opt->is_changed = 1;
}
Expand Down Expand Up @@ -372,7 +375,7 @@ int ip_options_compile(struct net *net,
goto error;
}
opt->ts = optptr - iph;
if (skb) {
if (rt) {
memcpy(&optptr[optptr[2]-1], &spec_dst, 4);
timeptr = &optptr[optptr[2]+3];
}
Expand Down

0 comments on commit 30ddf76

Please sign in to comment.