]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/route.c
net/ipv4: Move && and || to end of previous line
[net-next-2.6.git] / net / ipv4 / route.c
index 5b1050a5d874e35ffd608f8e6d0bbb2f1a5204f4..7547944ea9bff1ad7358e1b86defc93f68a749d7 100644 (file)
@@ -1346,9 +1346,9 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
                return;
 
        net = dev_net(dev);
-       if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev)
-           || ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw)
-           || ipv4_is_zeronet(new_gw))
+       if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) ||
+           ipv4_is_multicast(new_gw) || ipv4_is_lbcast(new_gw) ||
+           ipv4_is_zeronet(new_gw))
                goto reject_redirect;
 
        if (!rt_caching(net))
@@ -1628,9 +1628,6 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph,
        __be32  daddr = iph->daddr;
        unsigned short est_mtu = 0;
 
-       if (ipv4_config.no_pmtu_disc)
-               return 0;
-
        for (k = 0; k < 2; k++) {
                for (i = 0; i < 2; i++) {
                        unsigned hash = rt_hash(daddr, skeys[i], ikeys[k],
@@ -2314,10 +2311,11 @@ skip_cache:
                                ip_hdr(skb)->protocol);
                        if (our
 #ifdef CONFIG_IP_MROUTE
-                           || (!ipv4_is_local_multicast(daddr) &&
-                               IN_DEV_MFORWARD(in_dev))
+                               ||
+                           (!ipv4_is_local_multicast(daddr) &&
+                            IN_DEV_MFORWARD(in_dev))
 #endif
-                           ) {
+                          ) {
                                rcu_read_unlock();
                                return ip_route_input_mc(skb, daddr, saddr,
                                                         tos, dev, our);
@@ -2514,9 +2512,9 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp,
                      of another iface. --ANK
                 */
 
-               if (oldflp->oif == 0
-                   && (ipv4_is_multicast(oldflp->fl4_dst) ||
-                       oldflp->fl4_dst == htonl(0xFFFFFFFF))) {
+               if (oldflp->oif == 0 &&
+                   (ipv4_is_multicast(oldflp->fl4_dst) ||
+                    oldflp->fl4_dst == htonl(0xFFFFFFFF))) {
                        /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */
                        dev_out = ip_dev_find(net, oldflp->fl4_src);
                        if (dev_out == NULL)
@@ -2855,7 +2853,7 @@ static int rt_fill_info(struct net *net,
        error = rt->u.dst.error;
        expires = rt->u.dst.expires ? rt->u.dst.expires - jiffies : 0;
        if (rt->peer) {
-               id = rt->peer->ip_id_count;
+               id = atomic_read(&rt->peer->ip_id_count) & 0xffff;
                if (rt->peer->tcp_ts_stamp) {
                        ts = rt->peer->tcp_ts;
                        tsage = get_seconds() - rt->peer->tcp_ts_stamp;