Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
[PKT_SCHED]: vlan tag match
[NET]: Add if_addrlabel.h to sanitized headers.
[NET] rtnetlink.c: remove no longer used functions
[ICMP]: Restore pskb_pull calls in receive function
[INET]: Fix accidentally broken inet(6)_hash_connect's port offset calculations.
[NET]: Remove further references to net-modules.txt
bluetooth rfcomm tty: destroy before tty_close()
bluetooth: blacklist another Broadcom BCM2035 device
drivers/bluetooth/btsdio.c: fix double-free
drivers/bluetooth/bpa10x.c: fix memleak
bluetooth: uninlining
bluetooth: hidp_process_hid_control remove unnecessary parameter dealing
tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
hamradio: fix dmascc section mismatch
[SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier
[SCTP]: Fix kernel panic while received AUTH chunk while enabled auth
[IPV4]: Formatting fix for /proc/net/fib_trie.
[IPV6]: Fix sysctl compilation error.
[NET_SCHED]: Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest git broken build)
[IPV4]: Fix compile error building without CONFIG_FS_PROC
...

+84 -115
+1
drivers/bluetooth/bpa10x.c
··· 423 break; 424 425 default: 426 return -EILSEQ; 427 } 428
··· 423 break; 424 425 default: 426 + usb_free_urb(urb); 427 return -EILSEQ; 428 } 429
+1 -3
drivers/bluetooth/btsdio.c
··· 162 bt_cb(skb)->pkt_type = hdr[3]; 163 164 err = hci_recv_frame(skb); 165 - if (err < 0) { 166 - kfree(skb); 167 return err; 168 - } 169 170 sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); 171
··· 162 bt_cb(skb)->pkt_type = hdr[3]; 163 164 err = hci_recv_frame(skb); 165 + if (err < 0) 166 return err; 167 168 sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); 169
+1
drivers/bluetooth/hci_usb.c
··· 111 { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, 112 113 /* Broadcom BCM2035 */ 114 { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 115 { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, 116
··· 111 { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, 112 113 /* Broadcom BCM2035 */ 114 + { USB_DEVICE(0x0a5c, 0x2035), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 115 { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 116 { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, 117
+2 -4
drivers/net/Kconfig
··· 920 ---help--- 921 Support for the Microchip EN28J60 ethernet chip. 922 923 - To compile this driver as a module, choose M here and read 924 - <file:Documentation/networking/net-modules.txt>. The module will be 925 called enc28j60. 926 927 config ENC28J60_WRITEVERIFY ··· 2040 More specific information on configuring the driver is in 2041 <file:Documentation/networking/e1000.txt>. 2042 2043 - To compile this driver as a module, choose M here and read 2044 - <file:Documentation/networking/net-modules.txt>. The module 2045 will be called igb. 2046 2047 source "drivers/net/ixp2000/Kconfig"
··· 920 ---help--- 921 Support for the Microchip EN28J60 ethernet chip. 922 923 + To compile this driver as a module, choose M here. The module will be 924 called enc28j60. 925 926 config ENC28J60_WRITEVERIFY ··· 2041 More specific information on configuring the driver is in 2042 <file:Documentation/networking/e1000.txt>. 2043 2044 + To compile this driver as a module, choose M here. The module 2045 will be called igb. 2046 2047 source "drivers/net/ixp2000/Kconfig"
+2 -2
drivers/net/hamradio/dmascc.c
··· 262 263 static int io[MAX_NUM_DEVS] __initdata = { 0, }; 264 265 - /* Beware! hw[] is also used in cleanup_module(). */ 266 - static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE; 267 268 269 /* Global variables */
··· 262 263 static int io[MAX_NUM_DEVS] __initdata = { 0, }; 264 265 + /* Beware! hw[] is also used in dmascc_exit(). */ 266 + static struct scc_hardware hw[NUM_TYPES] = HARDWARE; 267 268 269 /* Global variables */
+4
drivers/net/tun.c
··· 529 530 if (ifr->ifr_flags & IFF_NO_PI) 531 tun->flags |= TUN_NO_PI; 532 533 if (ifr->ifr_flags & IFF_ONE_QUEUE) 534 tun->flags |= TUN_ONE_QUEUE; 535 536 file->private_data = tun; 537 tun->attached = 1;
··· 529 530 if (ifr->ifr_flags & IFF_NO_PI) 531 tun->flags |= TUN_NO_PI; 532 + else 533 + tun->flags &= ~TUN_NO_PI; 534 535 if (ifr->ifr_flags & IFF_ONE_QUEUE) 536 tun->flags |= TUN_ONE_QUEUE; 537 + else 538 + tun->flags &= ~TUN_ONE_QUEUE; 539 540 file->private_data = tun; 541 tun->attached = 1;
+1
include/linux/Kbuild
··· 219 unifdef-y += icmp.h 220 unifdef-y += icmpv6.h 221 unifdef-y += if_addr.h 222 unifdef-y += if_arp.h 223 unifdef-y += if_bridge.h 224 unifdef-y += if_ec.h
··· 219 unifdef-y += icmp.h 220 unifdef-y += icmpv6.h 221 unifdef-y += if_addr.h 222 + unifdef-y += if_addrlabel.h 223 unifdef-y += if_arp.h 224 unifdef-y += if_bridge.h 225 unifdef-y += if_ec.h
+2 -1
include/linux/pkt_cls.h
··· 459 #define TCF_EM_U32 3 460 #define TCF_EM_META 4 461 #define TCF_EM_TEXT 5 462 - #define TCF_EM_MAX 5 463 464 enum 465 {
··· 459 #define TCF_EM_U32 3 460 #define TCF_EM_META 4 461 #define TCF_EM_TEXT 5 462 + #define TCF_EM_VLAN 6 463 + #define TCF_EM_MAX 6 464 465 enum 466 {
-12
include/linux/rtnetlink.h
··· 602 603 #include <linux/mutex.h> 604 605 - extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); 606 static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) 607 { 608 int len = strlen(str) + 1; 609 return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); 610 } 611 - 612 - extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); 613 - extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, 614 - struct rtattr *rta, int len); 615 - 616 - #define rtattr_parse_nested(tb, max, rta) \ 617 - rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) 618 - 619 - #define rtattr_parse_nested_compat(tb, max, rta, data, len) \ 620 - ({ data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ 621 - __rtattr_parse_nested_compat(tb, max, rta, len); }) 622 623 extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); 624 extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
··· 602 603 #include <linux/mutex.h> 604 605 static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) 606 { 607 int len = strlen(str) + 1; 608 return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); 609 } 610 611 extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); 612 extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
+1
include/linux/tc_ematch/tc_em_meta.h
··· 81 TCF_META_ID_SK_SNDTIMEO, 82 TCF_META_ID_SK_SENDMSG_OFF, 83 TCF_META_ID_SK_WRITE_PENDING, 84 __TCF_META_ID_MAX 85 }; 86 #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
··· 81 TCF_META_ID_SK_SNDTIMEO, 82 TCF_META_ID_SK_SENDMSG_OFF, 83 TCF_META_ID_SK_WRITE_PENDING, 84 + TCF_META_ID_VLAN_TAG, 85 __TCF_META_ID_MAX 86 }; 87 #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
+1 -1
include/net/inet_hashtables.h
··· 389 } 390 391 extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, 392 - struct sock *sk, 393 int (*check_established)(struct inet_timewait_death_row *, 394 struct sock *, __u16, struct inet_timewait_sock **), 395 void (*hash)(struct sock *sk));
··· 389 } 390 391 extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, 392 + struct sock *sk, u32 port_offset, 393 int (*check_established)(struct inet_timewait_death_row *, 394 struct sock *, __u16, struct inet_timewait_sock **), 395 void (*hash)(struct sock *sk));
+8
include/net/ip_fib.h
··· 266 #ifdef CONFIG_PROC_FS 267 extern int __net_init fib_proc_init(struct net *net); 268 extern void __net_exit fib_proc_exit(struct net *net); 269 #endif 270 271 #endif /* _NET_FIB_H */
··· 266 #ifdef CONFIG_PROC_FS 267 extern int __net_init fib_proc_init(struct net *net); 268 extern void __net_exit fib_proc_exit(struct net *net); 269 + #else 270 + static inline int fib_proc_init(struct net *net) 271 + { 272 + return 0; 273 + } 274 + static inline void fib_proc_exit(struct net *net) 275 + { 276 + } 277 #endif 278 279 #endif /* _NET_FIB_H */
+2 -4
include/net/ipv6.h
··· 110 111 /* sysctls */ 112 extern int sysctl_mld_max_msf; 113 - 114 extern struct ctl_path net_ipv6_ctl_path[]; 115 116 #define _DEVINC(statname, modifier, idev, field) \ ··· 585 int __user *optlen); 586 587 #ifdef CONFIG_PROC_FS 588 - extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); 589 - extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); 590 - 591 extern int ac6_proc_init(void); 592 extern void ac6_proc_exit(void); 593 extern int raw6_proc_init(void); ··· 617 extern ctl_table ipv6_route_table_template[]; 618 extern ctl_table ipv6_icmp_table_template[]; 619 620 extern int ipv6_sysctl_register(void); 621 extern void ipv6_sysctl_unregister(void); 622 #endif
··· 110 111 /* sysctls */ 112 extern int sysctl_mld_max_msf; 113 extern struct ctl_path net_ipv6_ctl_path[]; 114 115 #define _DEVINC(statname, modifier, idev, field) \ ··· 586 int __user *optlen); 587 588 #ifdef CONFIG_PROC_FS 589 extern int ac6_proc_init(void); 590 extern void ac6_proc_exit(void); 591 extern int raw6_proc_init(void); ··· 621 extern ctl_table ipv6_route_table_template[]; 622 extern ctl_table ipv6_icmp_table_template[]; 623 624 + extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); 625 + extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); 626 extern int ipv6_sysctl_register(void); 627 extern void ipv6_sysctl_unregister(void); 628 #endif
+20 -29
net/bluetooth/hidp/core.c
··· 135 } 136 } 137 138 - static inline int hidp_queue_event(struct hidp_session *session, struct input_dev *dev, 139 - unsigned int type, unsigned int code, int value) 140 { 141 unsigned char newleds; 142 struct sk_buff *skb; ··· 243 input_sync(dev); 244 } 245 246 - static inline int hidp_queue_report(struct hidp_session *session, unsigned char *data, int size) 247 { 248 struct sk_buff *skb; 249 ··· 288 hidp_schedule(session); 289 } 290 291 - static inline void hidp_set_timer(struct hidp_session *session) 292 { 293 if (session->idle_to > 0) 294 mod_timer(&session->timer, jiffies + HZ * session->idle_to); ··· 333 return err; 334 } 335 336 - static inline void hidp_process_handshake(struct hidp_session *session, unsigned char param) 337 { 338 BT_DBG("session %p param 0x%02x", session, param); 339 ··· 367 } 368 } 369 370 - static inline void hidp_process_hid_control(struct hidp_session *session, unsigned char param) 371 { 372 BT_DBG("session %p param 0x%02x", session, param); 373 374 - switch (param) { 375 - case HIDP_CTRL_NOP: 376 - break; 377 - 378 - case HIDP_CTRL_VIRTUAL_CABLE_UNPLUG: 379 /* Flush the transmit queues */ 380 skb_queue_purge(&session->ctrl_transmit); 381 skb_queue_purge(&session->intr_transmit); 382 383 /* Kill session thread */ 384 atomic_inc(&session->terminate); 385 - break; 386 - 387 - case HIDP_CTRL_HARD_RESET: 388 - case HIDP_CTRL_SOFT_RESET: 389 - case HIDP_CTRL_SUSPEND: 390 - case HIDP_CTRL_EXIT_SUSPEND: 391 - /* FIXME: We have to parse these and return no error */ 392 - break; 393 - 394 - default: 395 - __hidp_send_ctrl_message(session, 396 - HIDP_TRANS_HANDSHAKE | HIDP_HSHK_ERR_INVALID_PARAMETER, NULL, 0); 397 - break; 398 } 399 } 400 401 - static inline void hidp_process_data(struct hidp_session *session, struct sk_buff *skb, unsigned char param) 402 { 403 BT_DBG("session %p skb %p len %d param 0x%02x", session, skb, skb->len, param); 404 ··· 410 } 411 } 412 413 - static inline void hidp_recv_ctrl_frame(struct hidp_session *session, struct sk_buff *skb) 414 { 415 unsigned char hdr, type, param; 416 ··· 445 kfree_skb(skb); 446 } 447 448 - static inline void hidp_recv_intr_frame(struct hidp_session *session, struct sk_buff *skb) 449 { 450 unsigned char hdr; 451 ··· 614 return conn ? &conn->dev : NULL; 615 } 616 617 - static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) 618 { 619 struct input_dev *input = session->input; 620 int i; ··· 692 hid->quirks = hidp_blacklist[n].quirks; 693 } 694 695 - static inline void hidp_setup_hid(struct hidp_session *session, struct hidp_connadd_req *req) 696 { 697 struct hid_device *hid = session->hid; 698 struct hid_report *report;
··· 135 } 136 } 137 138 + static int hidp_queue_event(struct hidp_session *session, struct input_dev *dev, 139 + unsigned int type, unsigned int code, int value) 140 { 141 unsigned char newleds; 142 struct sk_buff *skb; ··· 243 input_sync(dev); 244 } 245 246 + static int hidp_queue_report(struct hidp_session *session, 247 + unsigned char *data, int size) 248 { 249 struct sk_buff *skb; 250 ··· 287 hidp_schedule(session); 288 } 289 290 + static void hidp_set_timer(struct hidp_session *session) 291 { 292 if (session->idle_to > 0) 293 mod_timer(&session->timer, jiffies + HZ * session->idle_to); ··· 332 return err; 333 } 334 335 + static void hidp_process_handshake(struct hidp_session *session, 336 + unsigned char param) 337 { 338 BT_DBG("session %p param 0x%02x", session, param); 339 ··· 365 } 366 } 367 368 + static void hidp_process_hid_control(struct hidp_session *session, 369 + unsigned char param) 370 { 371 BT_DBG("session %p param 0x%02x", session, param); 372 373 + if (param == HIDP_CTRL_VIRTUAL_CABLE_UNPLUG) { 374 /* Flush the transmit queues */ 375 skb_queue_purge(&session->ctrl_transmit); 376 skb_queue_purge(&session->intr_transmit); 377 378 /* Kill session thread */ 379 atomic_inc(&session->terminate); 380 } 381 } 382 383 + static void hidp_process_data(struct hidp_session *session, struct sk_buff *skb, 384 + unsigned char param) 385 { 386 BT_DBG("session %p skb %p len %d param 0x%02x", session, skb, skb->len, param); 387 ··· 423 } 424 } 425 426 + static void hidp_recv_ctrl_frame(struct hidp_session *session, 427 + struct sk_buff *skb) 428 { 429 unsigned char hdr, type, param; 430 ··· 457 kfree_skb(skb); 458 } 459 460 + static void hidp_recv_intr_frame(struct hidp_session *session, 461 + struct sk_buff *skb) 462 { 463 unsigned char hdr; 464 ··· 625 return conn ? &conn->dev : NULL; 626 } 627 628 + static int hidp_setup_input(struct hidp_session *session, 629 + struct hidp_connadd_req *req) 630 { 631 struct input_dev *input = session->input; 632 int i; ··· 702 hid->quirks = hidp_blacklist[n].quirks; 703 } 704 705 + static void hidp_setup_hid(struct hidp_session *session, 706 + struct hidp_connadd_req *req) 707 { 708 struct hid_device *hid = session->hid; 709 struct hid_report *report;
+2 -1
net/bluetooth/rfcomm/tty.c
··· 429 if (dev->tty) 430 tty_vhangup(dev->tty); 431 432 - rfcomm_dev_del(dev); 433 rfcomm_dev_put(dev); 434 return 0; 435 }
··· 429 if (dev->tty) 430 tty_vhangup(dev->tty); 431 432 + if (!test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) 433 + rfcomm_dev_del(dev); 434 rfcomm_dev_put(dev); 435 return 0; 436 }
-44
net/core/rtnetlink.c
··· 82 return mutex_trylock(&rtnl_mutex); 83 } 84 85 - int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len) 86 - { 87 - memset(tb, 0, sizeof(struct rtattr*)*maxattr); 88 - 89 - while (RTA_OK(rta, len)) { 90 - unsigned flavor = rta->rta_type; 91 - if (flavor && flavor <= maxattr) 92 - tb[flavor-1] = rta; 93 - rta = RTA_NEXT(rta, len); 94 - } 95 - return 0; 96 - } 97 - 98 - int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, 99 - struct rtattr *rta, int len) 100 - { 101 - if (RTA_PAYLOAD(rta) < len) 102 - return -1; 103 - if (RTA_PAYLOAD(rta) >= RTA_ALIGN(len) + sizeof(struct rtattr)) { 104 - rta = RTA_DATA(rta) + RTA_ALIGN(len); 105 - return rtattr_parse_nested(tb, maxattr, rta); 106 - } 107 - memset(tb, 0, sizeof(struct rtattr *) * maxattr); 108 - return 0; 109 - } 110 - 111 static struct rtnl_link *rtnl_msg_handlers[NPROTO]; 112 113 static inline int rtm_msgindex(int msgtype) ··· 414 rta->rta_len = size; 415 memcpy(RTA_DATA(rta), data, attrlen); 416 memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); 417 - } 418 - 419 - size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size) 420 - { 421 - size_t ret = RTA_PAYLOAD(rta); 422 - char *src = RTA_DATA(rta); 423 - 424 - if (ret > 0 && src[ret - 1] == '\0') 425 - ret--; 426 - if (size > 0) { 427 - size_t len = (ret >= size) ? size - 1 : ret; 428 - memset(dest, 0, size); 429 - memcpy(dest, src, len); 430 - } 431 - return ret; 432 } 433 434 int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, int echo) ··· 1370 } 1371 1372 EXPORT_SYMBOL(__rta_fill); 1373 - EXPORT_SYMBOL(rtattr_strlcpy); 1374 - EXPORT_SYMBOL(rtattr_parse); 1375 - EXPORT_SYMBOL(__rtattr_parse_nested_compat); 1376 EXPORT_SYMBOL(rtnetlink_put_metrics); 1377 EXPORT_SYMBOL(rtnl_lock); 1378 EXPORT_SYMBOL(rtnl_trylock);
··· 82 return mutex_trylock(&rtnl_mutex); 83 } 84 85 static struct rtnl_link *rtnl_msg_handlers[NPROTO]; 86 87 static inline int rtm_msgindex(int msgtype) ··· 440 rta->rta_len = size; 441 memcpy(RTA_DATA(rta), data, attrlen); 442 memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); 443 } 444 445 int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, int echo) ··· 1411 } 1412 1413 EXPORT_SYMBOL(__rta_fill); 1414 EXPORT_SYMBOL(rtnetlink_put_metrics); 1415 EXPORT_SYMBOL(rtnl_lock); 1416 EXPORT_SYMBOL(rtnl_trylock);
+1 -2
net/ipv4/fib_trie.c
··· 2431 rtn_type(buf2, sizeof(buf2), 2432 fa->fa_type)); 2433 if (fa->fa_tos) 2434 - seq_printf(seq, "tos =%d\n", 2435 - fa->fa_tos); 2436 seq_putc(seq, '\n'); 2437 } 2438 }
··· 2431 rtn_type(buf2, sizeof(buf2), 2432 fa->fa_type)); 2433 if (fa->fa_tos) 2434 + seq_printf(seq, " tos=%d", fa->fa_tos); 2435 seq_putc(seq, '\n'); 2436 } 2437 }
+2 -1
net/ipv4/icmp.c
··· 1015 goto error; 1016 } 1017 1018 - __skb_pull(skb, sizeof(*icmph)); 1019 1020 icmph = icmp_hdr(skb); 1021
··· 1015 goto error; 1016 } 1017 1018 + if (!pskb_pull(skb, sizeof(*icmph))) 1019 + goto error; 1020 1021 icmph = icmp_hdr(skb); 1022
+3 -3
net/ipv4/inet_hashtables.c
··· 398 EXPORT_SYMBOL_GPL(inet_unhash); 399 400 int __inet_hash_connect(struct inet_timewait_death_row *death_row, 401 - struct sock *sk, 402 int (*check_established)(struct inet_timewait_death_row *, 403 struct sock *, __u16, struct inet_timewait_sock **), 404 void (*hash)(struct sock *sk)) ··· 413 if (!snum) { 414 int i, remaining, low, high, port; 415 static u32 hint; 416 - u32 offset = hint + inet_sk_port_offset(sk); 417 struct hlist_node *node; 418 struct inet_timewait_sock *tw = NULL; 419 ··· 502 int inet_hash_connect(struct inet_timewait_death_row *death_row, 503 struct sock *sk) 504 { 505 - return __inet_hash_connect(death_row, sk, 506 __inet_check_established, __inet_hash_nolisten); 507 } 508
··· 398 EXPORT_SYMBOL_GPL(inet_unhash); 399 400 int __inet_hash_connect(struct inet_timewait_death_row *death_row, 401 + struct sock *sk, u32 port_offset, 402 int (*check_established)(struct inet_timewait_death_row *, 403 struct sock *, __u16, struct inet_timewait_sock **), 404 void (*hash)(struct sock *sk)) ··· 413 if (!snum) { 414 int i, remaining, low, high, port; 415 static u32 hint; 416 + u32 offset = hint + port_offset; 417 struct hlist_node *node; 418 struct inet_timewait_sock *tw = NULL; 419 ··· 502 int inet_hash_connect(struct inet_timewait_death_row *death_row, 503 struct sock *sk) 504 { 505 + return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk), 506 __inet_check_established, __inet_hash_nolisten); 507 } 508
+1 -1
net/ipv4/xfrm4_mode_beet.c
··· 102 103 XFRM_MODE_SKB_CB(skb)->protocol = ph->nexthdr; 104 105 - if (!pskb_may_pull(skb, phlen)); 106 goto out; 107 __skb_pull(skb, phlen); 108 }
··· 102 103 XFRM_MODE_SKB_CB(skb)->protocol = ph->nexthdr; 104 105 + if (!pskb_may_pull(skb, phlen)) 106 goto out; 107 __skb_pull(skb, phlen); 108 }
+2 -1
net/ipv6/icmp.c
··· 683 } 684 } 685 686 - __skb_pull(skb, sizeof(*hdr)); 687 688 hdr = icmp6_hdr(skb); 689
··· 683 } 684 } 685 686 + if (!pskb_pull(skb, sizeof(*hdr))) 687 + goto discard_it; 688 689 hdr = icmp6_hdr(skb); 690
+1 -1
net/ipv6/inet6_hashtables.c
··· 236 int inet6_hash_connect(struct inet_timewait_death_row *death_row, 237 struct sock *sk) 238 { 239 - return __inet_hash_connect(death_row, sk, 240 __inet6_check_established, __inet6_hash); 241 } 242
··· 236 int inet6_hash_connect(struct inet_timewait_death_row *death_row, 237 struct sock *sk) 238 { 239 + return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk), 240 __inet6_check_established, __inet6_hash); 241 } 242
+2 -2
net/sched/cls_flow.c
··· 594 595 if (tcf_exts_dump(skb, &f->exts, &flow_ext_map) < 0) 596 goto nla_put_failure; 597 - 598 if (f->ematches.hdr.nmatches && 599 tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) 600 goto nla_put_failure; 601 - 602 nla_nest_end(skb, nest); 603 604 if (tcf_exts_dump_stats(skb, &f->exts, &flow_ext_map) < 0)
··· 594 595 if (tcf_exts_dump(skb, &f->exts, &flow_ext_map) < 0) 596 goto nla_put_failure; 597 + #ifdef CONFIG_NET_EMATCH 598 if (f->ematches.hdr.nmatches && 599 tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) 600 goto nla_put_failure; 601 + #endif 602 nla_nest_end(skb, nest); 603 604 if (tcf_exts_dump_stats(skb, &f->exts, &flow_ext_map) < 0)
+17
net/sched/em_meta.c
··· 65 #include <linux/string.h> 66 #include <linux/skbuff.h> 67 #include <linux/random.h> 68 #include <linux/tc_ematch/tc_em_meta.h> 69 #include <net/dst.h> 70 #include <net/route.h> ··· 169 { 170 *err = var_dev(skb->dev, dst); 171 } 172 173 /************************************************************************** 174 * skb attributes ··· 536 [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo), 537 [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), 538 [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), 539 } 540 }; 541
··· 65 #include <linux/string.h> 66 #include <linux/skbuff.h> 67 #include <linux/random.h> 68 + #include <linux/if_vlan.h> 69 #include <linux/tc_ematch/tc_em_meta.h> 70 #include <net/dst.h> 71 #include <net/route.h> ··· 168 { 169 *err = var_dev(skb->dev, dst); 170 } 171 + 172 + /************************************************************************** 173 + * vlan tag 174 + **************************************************************************/ 175 + 176 + META_COLLECTOR(int_vlan_tag) 177 + { 178 + unsigned short tag; 179 + if (vlan_get_tag(skb, &tag) < 0) 180 + *err = -1; 181 + else 182 + dst->value = tag; 183 + } 184 + 185 + 186 187 /************************************************************************** 188 * skb attributes ··· 520 [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo), 521 [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), 522 [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), 523 + [META_ID(VLAN_TAG)] = META_FUNC(int_vlan_tag), 524 } 525 }; 526
+3 -3
net/sctp/auth.c
··· 420 const struct sctp_association *asoc, 421 __u16 key_id) 422 { 423 - struct sctp_shared_key *key = NULL; 424 425 /* First search associations set of endpoint pair shared keys */ 426 key_for_each(key, &asoc->endpoint_shared_keys) { 427 if (key->key_id == key_id) 428 - break; 429 } 430 431 - return key; 432 } 433 434 /*
··· 420 const struct sctp_association *asoc, 421 __u16 key_id) 422 { 423 + struct sctp_shared_key *key; 424 425 /* First search associations set of endpoint pair shared keys */ 426 key_for_each(key, &asoc->endpoint_shared_keys) { 427 if (key->key_id == key_id) 428 + return key; 429 } 430 431 + return NULL; 432 } 433 434 /*
+4
net/sctp/sm_statefuns.c
··· 3865 struct sctp_chunk *err_chunk; 3866 sctp_ierror_t error; 3867 3868 if (!sctp_vtag_verify(chunk, asoc)) { 3869 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, 3870 SCTP_NULL());
··· 3865 struct sctp_chunk *err_chunk; 3866 sctp_ierror_t error; 3867 3868 + /* Make sure that the peer has AUTH capable */ 3869 + if (!asoc->peer.auth_capable) 3870 + return sctp_sf_unk_chunk(ep, asoc, type, arg, commands); 3871 + 3872 if (!sctp_vtag_verify(chunk, asoc)) { 3873 sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, 3874 SCTP_NULL());