~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to net/ipv4/af_inet.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1101
1101
static int inet_sk_reselect_saddr(struct sock *sk)
1102
1102
{
1103
1103
        struct inet_sock *inet = inet_sk(sk);
1104
 
        int err;
 
1104
        __be32 old_saddr = inet->inet_saddr;
 
1105
        __be32 daddr = inet->inet_daddr;
1105
1106
        struct rtable *rt;
1106
 
        __be32 old_saddr = inet->inet_saddr;
1107
1107
        __be32 new_saddr;
1108
 
        __be32 daddr = inet->inet_daddr;
1109
1108
 
1110
1109
        if (inet->opt && inet->opt->srr)
1111
1110
                daddr = inet->opt->faddr;
1112
1111
 
1113
1112
        /* Query new route. */
1114
 
        err = ip_route_connect(&rt, daddr, 0,
1115
 
                               RT_CONN_FLAGS(sk),
1116
 
                               sk->sk_bound_dev_if,
1117
 
                               sk->sk_protocol,
1118
 
                               inet->inet_sport, inet->inet_dport, sk, 0);
1119
 
        if (err)
1120
 
                return err;
 
1113
        rt = ip_route_connect(daddr, 0, RT_CONN_FLAGS(sk),
 
1114
                              sk->sk_bound_dev_if, sk->sk_protocol,
 
1115
                              inet->inet_sport, inet->inet_dport, sk, false);
 
1116
        if (IS_ERR(rt))
 
1117
                return PTR_ERR(rt);
1121
1118
 
1122
1119
        sk_setup_caps(sk, &rt->dst);
1123
1120
 
1160
1157
        daddr = inet->inet_daddr;
1161
1158
        if (inet->opt && inet->opt->srr)
1162
1159
                daddr = inet->opt->faddr;
1163
 
{
1164
 
        struct flowi fl = {
1165
 
                .oif = sk->sk_bound_dev_if,
1166
 
                .mark = sk->sk_mark,
1167
 
                .fl4_dst = daddr,
1168
 
                .fl4_src = inet->inet_saddr,
1169
 
                .fl4_tos = RT_CONN_FLAGS(sk),
1170
 
                .proto = sk->sk_protocol,
1171
 
                .flags = inet_sk_flowi_flags(sk),
1172
 
                .fl_ip_sport = inet->inet_sport,
1173
 
                .fl_ip_dport = inet->inet_dport,
1174
 
        };
1175
 
 
1176
 
        security_sk_classify_flow(sk, &fl);
1177
 
        err = ip_route_output_flow(sock_net(sk), &rt, &fl, sk, 0);
1178
 
}
1179
 
        if (!err)
 
1160
        rt = ip_route_output_ports(sock_net(sk), sk, daddr, inet->inet_saddr,
 
1161
                                   inet->inet_dport, inet->inet_sport,
 
1162
                                   sk->sk_protocol, RT_CONN_FLAGS(sk),
 
1163
                                   sk->sk_bound_dev_if);
 
1164
        if (!IS_ERR(rt)) {
 
1165
                err = 0;
1180
1166
                sk_setup_caps(sk, &rt->dst);
1181
 
        else {
 
1167
        } else {
 
1168
                err = PTR_ERR(rt);
 
1169
 
1182
1170
                /* Routing failed... */
1183
1171
                sk->sk_route_caps = 0;
1184
1172
                /*
1231
1219
        return err;
1232
1220
}
1233
1221
 
1234
 
static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
 
1222
static struct sk_buff *inet_gso_segment(struct sk_buff *skb, u32 features)
1235
1223
{
1236
1224
        struct sk_buff *segs = ERR_PTR(-EINVAL);
1237
1225
        struct iphdr *iph;