projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0374d9c
)
ipv4: Always call ip_options_build() after rest of IP header is filled in.
author
David S. Miller
<
[email protected]
>
Fri, 13 May 2011 21:21:27 +0000
(17:21 -0400)
committer
David S. Miller
<
[email protected]
>
Fri, 13 May 2011 21:21:27 +0000
(17:21 -0400)
This will allow ip_options_build() to reliably look at the values of
iph->{daddr,saddr}
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ip_output.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_output.c
b/net/ipv4/ip_output.c
index 70778d48aa7b19ce9531f5b96beb48fb2896e425..98af3697c7188870effc865e3caaef76e579a809 100644
(file)
--- a/
net/ipv4/ip_output.c
+++ b/
net/ipv4/ip_output.c
@@
-1327,10
+1327,6
@@
struct sk_buff *__ip_make_skb(struct sock *sk,
iph = (struct iphdr *)skb->data;
iph->version = 4;
iph->ihl = 5;
- if (opt) {
- iph->ihl += opt->optlen>>2;
- ip_options_build(skb, opt, cork->addr, rt, 0);
- }
iph->tos = inet->tos;
iph->frag_off = df;
ip_select_ident(iph, &rt->dst, sk);
@@
-1339,6
+1335,11
@@
struct sk_buff *__ip_make_skb(struct sock *sk,
iph->saddr = fl4->saddr;
iph->daddr = fl4->daddr;
+ if (opt) {
+ iph->ihl += opt->optlen>>2;
+ ip_options_build(skb, opt, cork->addr, rt, 0);
+ }
+
skb->priority = sk->sk_priority;
skb->mark = sk->sk_mark;
/*