~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to net/netfilter/xt_TCPMSS.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb,
149
149
                                    unsigned int family)
150
150
{
151
 
        struct flowi fl = {};
 
151
        struct flowi fl;
152
152
        const struct nf_afinfo *ai;
153
153
        struct rtable *rt = NULL;
154
154
        u_int32_t mtu     = ~0U;
155
155
 
156
 
        if (family == PF_INET)
157
 
                fl.fl4_dst = ip_hdr(skb)->saddr;
158
 
        else
159
 
                fl.fl6_dst = ipv6_hdr(skb)->saddr;
 
156
        if (family == PF_INET) {
 
157
                struct flowi4 *fl4 = &fl.u.ip4;
 
158
                memset(fl4, 0, sizeof(*fl4));
 
159
                fl4->daddr = ip_hdr(skb)->saddr;
 
160
        } else {
 
161
                struct flowi6 *fl6 = &fl.u.ip6;
160
162
 
 
163
                memset(fl6, 0, sizeof(*fl6));
 
164
                ipv6_addr_copy(&fl6->daddr, &ipv6_hdr(skb)->saddr);
 
165
        }
161
166
        rcu_read_lock();
162
167
        ai = nf_get_afinfo(family);
163
168
        if (ai != NULL)
164
 
                ai->route((struct dst_entry **)&rt, &fl);
 
169
                ai->route(&init_net, (struct dst_entry **)&rt, &fl, false);
165
170
        rcu_read_unlock();
166
171
 
167
172
        if (rt != NULL) {