This will allow ip_options_build() to reliably look at the values of
iph->{daddr,saddr}
Signed-off-by: David S. Miller <davem@davemloft.net>
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);
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;
/*