Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[AF_RXRPC]: Add a missing goto
[VLAN]: Lost rtnl_unlock() in vlan_ioctl()
[SCTP]: Fix the bind_addr info during migration.
[SCTP]: Add bind hash locking to the migrate code
[IPV4]: Remove prototype of ip_rt_advice
[IPv4]: Reply net unreachable ICMP message
[IPv6] SNMP: Increment OutNoRoutes when connecting to unreachable network
[BRIDGE]: Section fix.
[NIU]: Fix link LED handling.

+64 -18
+18 -4
drivers/net/niu.c
··· 1045 1045 } 1046 1046 1047 1047 static void niu_init_xif(struct niu *); 1048 + static void niu_handle_led(struct niu *, int status); 1048 1049 1049 1050 static int niu_link_status_common(struct niu *np, int link_up) 1050 1051 { ··· 1067 1066 1068 1067 spin_lock_irqsave(&np->lock, flags); 1069 1068 niu_init_xif(np); 1069 + niu_handle_led(np, 1); 1070 1070 spin_unlock_irqrestore(&np->lock, flags); 1071 1071 1072 1072 netif_carrier_on(dev); 1073 1073 } else if (netif_carrier_ok(dev) && !link_up) { 1074 1074 niuwarn(LINK, "%s: Link is down\n", dev->name); 1075 + spin_lock_irqsave(&np->lock, flags); 1076 + niu_handle_led(np, 0); 1077 + spin_unlock_irqrestore(&np->lock, flags); 1075 1078 netif_carrier_off(dev); 1076 1079 } 1077 1080 ··· 3920 3915 return 0; 3921 3916 } 3922 3917 3923 - static void niu_init_xif_xmac(struct niu *np) 3918 + static void niu_handle_led(struct niu *np, int status) 3924 3919 { 3925 - struct niu_link_config *lp = &np->link_config; 3926 3920 u64 val; 3927 - 3928 3921 val = nr64_mac(XMAC_CONFIG); 3929 3922 3930 3923 if ((np->flags & NIU_FLAGS_10G) != 0 && 3931 3924 (np->flags & NIU_FLAGS_FIBER) != 0) { 3932 - if (netif_carrier_ok(np->dev)) { 3925 + if (status) { 3933 3926 val |= XMAC_CONFIG_LED_POLARITY; 3934 3927 val &= ~XMAC_CONFIG_FORCE_LED_ON; 3935 3928 } else { ··· 3936 3933 } 3937 3934 } 3938 3935 3936 + nw64_mac(XMAC_CONFIG, val); 3937 + } 3938 + 3939 + static void niu_init_xif_xmac(struct niu *np) 3940 + { 3941 + struct niu_link_config *lp = &np->link_config; 3942 + u64 val; 3943 + 3944 + val = nr64_mac(XMAC_CONFIG); 3939 3945 val &= ~XMAC_CONFIG_SEL_POR_CLK_SRC; 3940 3946 3941 3947 val |= XMAC_CONFIG_TX_OUTPUT_EN; ··· 4787 4775 niu_free_irq(np); 4788 4776 4789 4777 niu_free_channels(np); 4778 + 4779 + niu_handle_led(np, 0); 4790 4780 4791 4781 return 0; 4792 4782 }
-1
include/net/route.h
··· 109 109 extern int ip_rt_init(void); 110 110 extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, 111 111 __be32 src, struct net_device *dev); 112 - extern void ip_rt_advice(struct rtable **rp, int advice); 113 112 extern void rt_cache_flush(int how); 114 113 extern int __ip_route_output_key(struct rtable **, const struct flowi *flp); 115 114 extern int ip_route_output_key(struct rtable **, struct flowi *flp);
+3
include/net/sctp/structs.h
··· 1184 1184 const struct sctp_bind_addr *src, 1185 1185 sctp_scope_t scope, gfp_t gfp, 1186 1186 int flags); 1187 + int sctp_bind_addr_dup(struct sctp_bind_addr *dest, 1188 + const struct sctp_bind_addr *src, 1189 + gfp_t gfp); 1187 1190 int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, 1188 1191 __u8 use_as_src, gfp_t gfp); 1189 1192 int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
+1 -1
net/8021q/vlan.c
··· 776 776 case SET_VLAN_NAME_TYPE_CMD: 777 777 err = -EPERM; 778 778 if (!capable(CAP_NET_ADMIN)) 779 - return -EPERM; 779 + break; 780 780 if ((args.u.name_type >= 0) && 781 781 (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) { 782 782 vlan_name_type = args.u.name_type;
+1 -1
net/bridge/br_fdb.c
··· 44 44 return 0; 45 45 } 46 46 47 - void __exit br_fdb_fini(void) 47 + void br_fdb_fini(void) 48 48 { 49 49 kmem_cache_destroy(br_fdb_cache); 50 50 }
+4 -1
net/ipv4/route.c
··· 1161 1161 unsigned hash = rt_hash(rt->fl.fl4_dst, rt->fl.fl4_src, 1162 1162 rt->fl.oif); 1163 1163 #if RT_CACHE_DEBUG >= 1 1164 - printk(KERN_DEBUG "ip_rt_advice: redirect to " 1164 + printk(KERN_DEBUG "ipv4_negative_advice: redirect to " 1165 1165 "%u.%u.%u.%u/%02x dropped\n", 1166 1166 NIPQUAD(rt->rt_dst), rt->fl.fl4_tos); 1167 1167 #endif ··· 1252 1252 break; 1253 1253 case ENETUNREACH: 1254 1254 code = ICMP_NET_UNREACH; 1255 + IP_INC_STATS_BH(IPSTATS_MIB_INNOROUTES); 1255 1256 break; 1256 1257 case EACCES: 1257 1258 code = ICMP_PKT_FILTERED; ··· 1882 1881 RT_CACHE_STAT_INC(in_no_route); 1883 1882 spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); 1884 1883 res.type = RTN_UNREACHABLE; 1884 + if (err == -ESRCH) 1885 + err = -ENETUNREACH; 1885 1886 goto local_input; 1886 1887 1887 1888 /*
+2
net/ipv6/ip6_output.c
··· 933 933 return 0; 934 934 935 935 out_err_release: 936 + if (err == -ENETUNREACH) 937 + IP6_INC_STATS_BH(NULL, IPSTATS_MIB_OUTNOROUTES); 936 938 dst_release(*dst); 937 939 *dst = NULL; 938 940 return err;
+1
net/rxrpc/rxkad.c
··· 1021 1021 1022 1022 abort_code = RXKADINCONSISTENCY; 1023 1023 if (version != RXKAD_VERSION) 1024 + goto protocol_error; 1024 1025 1025 1026 abort_code = RXKADTICKETLEN; 1026 1027 if (ticket_len < 4 || ticket_len > MAXKRB5TICKETLEN)
+26
net/sctp/bind_addr.c
··· 105 105 return error; 106 106 } 107 107 108 + /* Exactly duplicate the address lists. This is necessary when doing 109 + * peer-offs and accepts. We don't want to put all the current system 110 + * addresses into the endpoint. That's useless. But we do want duplicat 111 + * the list of bound addresses that the older endpoint used. 112 + */ 113 + int sctp_bind_addr_dup(struct sctp_bind_addr *dest, 114 + const struct sctp_bind_addr *src, 115 + gfp_t gfp) 116 + { 117 + struct sctp_sockaddr_entry *addr; 118 + struct list_head *pos; 119 + int error = 0; 120 + 121 + /* All addresses share the same port. */ 122 + dest->port = src->port; 123 + 124 + list_for_each(pos, &src->address_list) { 125 + addr = list_entry(pos, struct sctp_sockaddr_entry, list); 126 + error = sctp_add_bind_addr(dest, &addr->a, 1, gfp); 127 + if (error < 0) 128 + break; 129 + } 130 + 131 + return error; 132 + } 133 + 108 134 /* Initialize the SCTP_bind_addr structure for either an endpoint or 109 135 * an association. 110 136 */
+8 -10
net/sctp/socket.c
··· 6325 6325 struct sctp_endpoint *newep = newsp->ep; 6326 6326 struct sk_buff *skb, *tmp; 6327 6327 struct sctp_ulpevent *event; 6328 - int flags = 0; 6328 + struct sctp_bind_hashbucket *head; 6329 6329 6330 6330 /* Migrate socket buffer sizes and all the socket level options to the 6331 6331 * new socket. ··· 6342 6342 newsp->hmac = NULL; 6343 6343 6344 6344 /* Hook this new socket in to the bind_hash list. */ 6345 + head = &sctp_port_hashtable[sctp_phashfn(inet_sk(oldsk)->num)]; 6346 + sctp_local_bh_disable(); 6347 + sctp_spin_lock(&head->lock); 6345 6348 pp = sctp_sk(oldsk)->bind_hash; 6346 6349 sk_add_bind_node(newsk, &pp->owner); 6347 6350 sctp_sk(newsk)->bind_hash = pp; 6348 6351 inet_sk(newsk)->num = inet_sk(oldsk)->num; 6352 + sctp_spin_unlock(&head->lock); 6353 + sctp_local_bh_enable(); 6349 6354 6350 6355 /* Copy the bind_addr list from the original endpoint to the new 6351 6356 * endpoint so that we can handle restarts properly 6352 6357 */ 6353 - if (PF_INET6 == assoc->base.sk->sk_family) 6354 - flags = SCTP_ADDR6_ALLOWED; 6355 - if (assoc->peer.ipv4_address) 6356 - flags |= SCTP_ADDR4_PEERSUPP; 6357 - if (assoc->peer.ipv6_address) 6358 - flags |= SCTP_ADDR6_PEERSUPP; 6359 - sctp_bind_addr_copy(&newsp->ep->base.bind_addr, 6360 - &oldsp->ep->base.bind_addr, 6361 - SCTP_SCOPE_GLOBAL, GFP_KERNEL, flags); 6358 + sctp_bind_addr_dup(&newsp->ep->base.bind_addr, 6359 + &oldsp->ep->base.bind_addr, GFP_KERNEL); 6362 6360 6363 6361 /* Move any messages in the old socket's receive queue that are for the 6364 6362 * peeled off association to the new socket's receive queue.