Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: (25 commits)
[XFRM]: Allow packet drops during larval state resolution.
[CASSINI]: Check pci_set_mwi() return value.
[NET]: "wrong timeout value" in sk_wait_data() v2
[NETFILTER]: nf_nat_h323: call set_h225_addr instead of set_h225_addr_hook
[NETFILTER]: nf_conntrack_h323: add missing T.120 address in OLCA
[NETFILTER]: nf_conntrack_h323: remove unnecessary process of Information signal
[NETFILTER]: nf_conntrack_h323: fix get_h225_addr() for IPv6 address access
[NETFILTER]: nf_conntrack_h323: fix ASN.1 types
[NETFILTER]: nf_conntrack_ftp: fix newline sequence number calculation
[NETFILTER]: nf_conntrack_ftp: fix newline sequence number update
[NET_SCHED]: sch_htb: fix event cache time calculation
[DCCP]: Fix build warning when debugging is disabled.
[TIPC]: Fixed erroneous introduction of for_each_netdev
[RTNETLINK]: Fix sending netlink message when replace route.
[TR]: Use menuconfig objects.
[ARCNET]: Use menuconfig objects.
[TIPC]: Use menuconfig objects.
[SCTP]: Use menuconfig objects.
[IPVS]: Use menuconfig objects.
[DCCP]: Use menuconfig objects.
...

+473 -307
+14 -13
drivers/atm/idt77252.c
··· 47 47 #include <linux/bitops.h> 48 48 #include <linux/wait.h> 49 49 #include <linux/jiffies.h> 50 - #include <asm/semaphore.h> 50 + #include <linux/mutex.h> 51 + 51 52 #include <asm/io.h> 52 53 #include <asm/uaccess.h> 53 54 #include <asm/atomic.h> ··· 2436 2435 2437 2436 set_bit(ATM_VF_ADDR, &vcc->flags); 2438 2437 2439 - down(&card->mutex); 2438 + mutex_lock(&card->mutex); 2440 2439 2441 2440 OPRINTK("%s: opening vpi.vci: %d.%d\n", card->name, vpi, vci); 2442 2441 ··· 2447 2446 break; 2448 2447 default: 2449 2448 printk("%s: Unsupported AAL: %d\n", card->name, vcc->qos.aal); 2450 - up(&card->mutex); 2449 + mutex_unlock(&card->mutex); 2451 2450 return -EPROTONOSUPPORT; 2452 2451 } 2453 2452 ··· 2456 2455 card->vcs[index] = kzalloc(sizeof(struct vc_map), GFP_KERNEL); 2457 2456 if (!card->vcs[index]) { 2458 2457 printk("%s: can't alloc vc in open()\n", card->name); 2459 - up(&card->mutex); 2458 + mutex_unlock(&card->mutex); 2460 2459 return -ENOMEM; 2461 2460 } 2462 2461 card->vcs[index]->card = card; ··· 2485 2484 if (inuse) { 2486 2485 printk("%s: %s vci already in use.\n", card->name, 2487 2486 inuse == 1 ? "tx" : inuse == 2 ? "rx" : "tx and rx"); 2488 - up(&card->mutex); 2487 + mutex_unlock(&card->mutex); 2489 2488 return -EADDRINUSE; 2490 2489 } 2491 2490 2492 2491 if (vcc->qos.txtp.traffic_class != ATM_NONE) { 2493 2492 error = idt77252_init_tx(card, vc, vcc, &vcc->qos); 2494 2493 if (error) { 2495 - up(&card->mutex); 2494 + mutex_unlock(&card->mutex); 2496 2495 return error; 2497 2496 } 2498 2497 } ··· 2500 2499 if (vcc->qos.rxtp.traffic_class != ATM_NONE) { 2501 2500 error = idt77252_init_rx(card, vc, vcc, &vcc->qos); 2502 2501 if (error) { 2503 - up(&card->mutex); 2502 + mutex_unlock(&card->mutex); 2504 2503 return error; 2505 2504 } 2506 2505 } 2507 2506 2508 2507 set_bit(ATM_VF_READY, &vcc->flags); 2509 2508 2510 - up(&card->mutex); 2509 + mutex_unlock(&card->mutex); 2511 2510 return 0; 2512 2511 } 2513 2512 ··· 2521 2520 unsigned long addr; 2522 2521 unsigned long timeout; 2523 2522 2524 - down(&card->mutex); 2523 + mutex_lock(&card->mutex); 2525 2524 2526 2525 IPRINTK("%s: idt77252_close: vc = %d (%d.%d)\n", 2527 2526 card->name, vc->index, vcc->vpi, vcc->vci); ··· 2592 2591 free_scq(card, vc->scq); 2593 2592 } 2594 2593 2595 - up(&card->mutex); 2594 + mutex_unlock(&card->mutex); 2596 2595 } 2597 2596 2598 2597 static int ··· 2603 2602 struct vc_map *vc = vcc->dev_data; 2604 2603 int error = 0; 2605 2604 2606 - down(&card->mutex); 2605 + mutex_lock(&card->mutex); 2607 2606 2608 2607 if (qos->txtp.traffic_class != ATM_NONE) { 2609 2608 if (!test_bit(VCF_TX, &vc->flags)) { ··· 2649 2648 set_bit(ATM_VF_HASQOS, &vcc->flags); 2650 2649 2651 2650 out: 2652 - up(&card->mutex); 2651 + mutex_unlock(&card->mutex); 2653 2652 return error; 2654 2653 } 2655 2654 ··· 3710 3709 membase = pci_resource_start(pcidev, 1); 3711 3710 srambase = pci_resource_start(pcidev, 2); 3712 3711 3713 - init_MUTEX(&card->mutex); 3712 + mutex_init(&card->mutex); 3714 3713 spin_lock_init(&card->cmd_lock); 3715 3714 spin_lock_init(&card->tst_lock); 3716 3715
+2 -2
drivers/atm/idt77252.h
··· 37 37 #include <linux/ptrace.h> 38 38 #include <linux/skbuff.h> 39 39 #include <linux/workqueue.h> 40 - 40 + #include <linux/mutex.h> 41 41 42 42 /*****************************************************************************/ 43 43 /* */ ··· 359 359 unsigned long srambase; /* SAR's sram base address */ 360 360 void __iomem *fbq[4]; /* FBQ fill addresses */ 361 361 362 - struct semaphore mutex; 362 + struct mutex mutex; 363 363 spinlock_t cmd_lock; /* for r/w utility/sram */ 364 364 365 365 unsigned long softstat;
+8 -8
drivers/bluetooth/hci_usb.c
··· 115 115 { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, 116 116 117 117 /* Broadcom BCM2045 */ 118 - { USB_DEVICE(0x0a5c, 0x2101), .driver_info = HCI_WRONG_SCO_MTU }, 118 + { USB_DEVICE(0x0a5c, 0x2101), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 119 119 120 120 /* IBM/Lenovo ThinkPad with Broadcom chip */ 121 - { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU }, 122 - { USB_DEVICE(0x0a5c, 0x2110), .driver_info = HCI_WRONG_SCO_MTU }, 121 + { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 122 + { USB_DEVICE(0x0a5c, 0x2110), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 123 123 124 124 /* Targus ACB10US */ 125 125 { USB_DEVICE(0x0a5c, 0x2100), .driver_info = HCI_RESET }, ··· 128 128 { USB_DEVICE(0x0a5c, 0x2111), .driver_info = HCI_RESET }, 129 129 130 130 /* HP laptop with Broadcom chip */ 131 - { USB_DEVICE(0x03f0, 0x171d), .driver_info = HCI_WRONG_SCO_MTU }, 131 + { USB_DEVICE(0x03f0, 0x171d), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 132 132 133 133 /* Dell laptop with Broadcom chip */ 134 - { USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_WRONG_SCO_MTU }, 134 + { USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 135 135 136 136 /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ 137 137 { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, 138 138 139 139 /* Kensington Bluetooth USB adapter */ 140 140 { USB_DEVICE(0x047d, 0x105d), .driver_info = HCI_RESET }, 141 - { USB_DEVICE(0x047d, 0x105e), .driver_info = HCI_WRONG_SCO_MTU }, 141 + { USB_DEVICE(0x047d, 0x105e), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 142 142 143 143 /* ISSC Bluetooth Adapter v3.1 */ 144 144 { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET }, ··· 148 148 { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC }, 149 149 150 150 /* Belkin F8T012 and F8T013 devices */ 151 - { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_WRONG_SCO_MTU }, 152 - { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_WRONG_SCO_MTU }, 151 + { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 152 + { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 153 153 154 154 /* Digianswer devices */ 155 155 { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },
+4 -13
drivers/net/arcnet/Kconfig
··· 2 2 # Arcnet configuration 3 3 # 4 4 5 - menu "ARCnet devices" 5 + menuconfig ARCNET 6 6 depends on NETDEVICES && (ISA || PCI) 7 - 8 - config ARCNET 9 7 tristate "ARCnet support" 10 8 ---help--- 11 9 If you have a network card of this type, say Y and check out the ··· 23 25 <file:Documentation/networking/net-modules.txt>. The module will 24 26 be called arcnet. 25 27 28 + if ARCNET 29 + 26 30 config ARCNET_1201 27 31 tristate "Enable standard ARCNet packet format (RFC 1201)" 28 - depends on ARCNET 29 32 help 30 33 This allows you to use RFC1201 with your ARCnet card via the virtual 31 34 arc0 device. You need to say Y here to communicate with ··· 37 38 38 39 config ARCNET_1051 39 40 tristate "Enable old ARCNet packet format (RFC 1051)" 40 - depends on ARCNET 41 41 ---help--- 42 42 This allows you to use RFC1051 with your ARCnet card via the virtual 43 43 arc0s device. You only need arc0s if you want to talk to ARCnet ··· 51 53 52 54 config ARCNET_RAW 53 55 tristate "Enable raw mode packet interface" 54 - depends on ARCNET 55 56 help 56 57 ARCnet "raw mode" packet encapsulation, no soft headers. Unlikely 57 58 to work unless talking to a copy of the same Linux arcnet driver, ··· 58 61 59 62 config ARCNET_CAP 60 63 tristate "Enable CAP mode packet interface" 61 - depends on ARCNET 62 64 help 63 65 ARCnet "cap mode" packet encapsulation. Used to get the hardware 64 66 acknowledge back to userspace. After the initial protocol byte every ··· 76 80 77 81 config ARCNET_COM90xx 78 82 tristate "ARCnet COM90xx (normal) chipset driver" 79 - depends on ARCNET 80 83 help 81 84 This is the chipset driver for the standard COM90xx cards. If you 82 85 have always used the old ARCnet driver without knowing what type of ··· 87 92 88 93 config ARCNET_COM90xxIO 89 94 tristate "ARCnet COM90xx (IO mapped) chipset driver" 90 - depends on ARCNET 91 95 ---help--- 92 96 This is the chipset driver for the COM90xx cards, using them in 93 97 IO-mapped mode instead of memory-mapped mode. This is slower than ··· 99 105 100 106 config ARCNET_RIM_I 101 107 tristate "ARCnet COM90xx (RIM I) chipset driver" 102 - depends on ARCNET 103 108 ---help--- 104 109 This is yet another chipset driver for the COM90xx cards, but this 105 110 time only using memory-mapped mode, and no IO ports at all. This ··· 111 118 112 119 config ARCNET_COM20020 113 120 tristate "ARCnet COM20020 chipset driver" 114 - depends on ARCNET 115 121 help 116 122 This is the driver for the new COM20020 chipset. It supports such 117 123 things as promiscuous mode, so packet sniffing is possible, and ··· 128 136 tristate "Support for COM20020 on PCI" 129 137 depends on ARCNET_COM20020 && PCI 130 138 131 - endmenu 132 - 139 + endif # ARCNET
+4 -1
drivers/net/cassini.c
··· 4919 4919 pci_cmd &= ~PCI_COMMAND_SERR; 4920 4920 pci_cmd |= PCI_COMMAND_PARITY; 4921 4921 pci_write_config_word(pdev, PCI_COMMAND, pci_cmd); 4922 - pci_set_mwi(pdev); 4922 + if (pci_set_mwi(pdev)) 4923 + printk(KERN_WARNING PFX "Could enable MWI for %s\n", 4924 + pci_name(pdev)); 4925 + 4923 4926 /* 4924 4927 * On some architectures, the default cache line size set 4925 4928 * by pci_set_mwi reduces perforamnce. We have to increase
+16 -17
drivers/net/tokenring/Kconfig
··· 2 2 # Token Ring driver configuration 3 3 # 4 4 5 - menu "Token Ring devices" 6 - depends on NETDEVICES && !UML 7 - 8 5 # So far, we only have PCI, ISA, and MCA token ring devices 9 - config TR 6 + menuconfig TR 10 7 bool "Token Ring driver support" 8 + depends on NETDEVICES && !UML 11 9 depends on (PCI || ISA || MCA || CCW) 12 10 select LLC 13 11 help ··· 18 20 from <http://www.tldp.org/docs.html#howto>. Most people can 19 21 say N here. 20 22 23 + if TR 24 + 21 25 config IBMTR 22 26 tristate "IBM Tropic chipset based adapter support" 23 - depends on TR && (ISA || MCA) 27 + depends on ISA || MCA 24 28 ---help--- 25 29 This is support for all IBM Token Ring cards that don't use DMA. If 26 30 you have such a beast, say Y and read the Token-Ring mini-HOWTO, ··· 36 36 37 37 config IBMOL 38 38 tristate "IBM Olympic chipset PCI adapter support" 39 - depends on TR && PCI 39 + depends on PCI 40 40 ---help--- 41 41 This is support for all non-Lanstreamer IBM PCI Token Ring Cards. 42 42 Specifically this is all IBM PCI, PCI Wake On Lan, PCI II, PCI II ··· 54 54 55 55 config IBMLS 56 56 tristate "IBM Lanstreamer chipset PCI adapter support" 57 - depends on TR && PCI && !64BIT 57 + depends on PCI && !64BIT 58 58 help 59 59 This is support for IBM Lanstreamer PCI Token Ring Cards. 60 60 ··· 66 66 67 67 config 3C359 68 68 tristate "3Com 3C359 Token Link Velocity XL adapter support" 69 - depends on TR && PCI 69 + depends on PCI 70 70 ---help--- 71 71 This is support for the 3Com PCI Velocity XL cards, specifically 72 72 the 3Com 3C359, please note this is not for the 3C339 cards, you ··· 84 84 85 85 config TMS380TR 86 86 tristate "Generic TMS380 Token Ring ISA/PCI adapter support" 87 - depends on TR && (PCI || ISA && ISA_DMA_API || MCA) 87 + depends on PCI || ISA && ISA_DMA_API || MCA 88 88 select FW_LOADER 89 89 ---help--- 90 90 This driver provides generic support for token ring adapters ··· 108 108 109 109 config TMSPCI 110 110 tristate "Generic TMS380 PCI support" 111 - depends on TR && TMS380TR && PCI 111 + depends on TMS380TR && PCI 112 112 ---help--- 113 113 This tms380 module supports generic TMS380-based PCI cards. 114 114 ··· 123 123 124 124 config SKISA 125 125 tristate "SysKonnect TR4/16 ISA support" 126 - depends on TR && TMS380TR && ISA 126 + depends on TMS380TR && ISA 127 127 help 128 128 This tms380 module supports SysKonnect TR4/16 ISA cards. 129 129 ··· 135 135 136 136 config PROTEON 137 137 tristate "Proteon ISA support" 138 - depends on TR && TMS380TR && ISA 138 + depends on TMS380TR && ISA 139 139 help 140 140 This tms380 module supports Proteon ISA cards. 141 141 ··· 148 148 149 149 config ABYSS 150 150 tristate "Madge Smart 16/4 PCI Mk2 support" 151 - depends on TR && TMS380TR && PCI 151 + depends on TMS380TR && PCI 152 152 help 153 153 This tms380 module supports the Madge Smart 16/4 PCI Mk2 154 154 cards (51-02). ··· 158 158 159 159 config MADGEMC 160 160 tristate "Madge Smart 16/4 Ringnode MicroChannel" 161 - depends on TR && TMS380TR && MCA 161 + depends on TMS380TR && MCA 162 162 help 163 163 This tms380 module supports the Madge Smart 16/4 MC16 and MC32 164 164 MicroChannel adapters. ··· 168 168 169 169 config SMCTR 170 170 tristate "SMC ISA/MCA adapter support" 171 - depends on TR && (ISA || MCA_LEGACY) && (BROKEN || !64BIT) 171 + depends on (ISA || MCA_LEGACY) && (BROKEN || !64BIT) 172 172 ---help--- 173 173 This is support for the ISA and MCA SMC Token Ring cards, 174 174 specifically SMC TokenCard Elite (8115T) and SMC TokenCard Elite/A ··· 182 182 To compile this driver as a module, choose M here: the module will be 183 183 called smctr. 184 184 185 - endmenu 186 - 185 + endif # TR
+1 -2
include/linux/netfilter/nf_conntrack_ftp.h
··· 37 37 enum nf_ct_ftp_type type, 38 38 unsigned int matchoff, 39 39 unsigned int matchlen, 40 - struct nf_conntrack_expect *exp, 41 - u32 *seq); 40 + struct nf_conntrack_expect *exp); 42 41 #endif /* __KERNEL__ */ 43 42 44 43 #endif /* _NF_CONNTRACK_FTP_H */
+3 -20
include/linux/netfilter/nf_conntrack_h323_types.h
··· 1 - /* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 1 + /* Generated by Jing Min Zhao's ASN.1 parser, May 16 2007 2 2 * 3 3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 4 * ··· 12 12 13 13 typedef struct TransportAddress_ip6Address { /* SEQUENCE */ 14 14 int options; /* No use */ 15 - unsigned ip6; 15 + unsigned ip; 16 16 } TransportAddress_ip6Address; 17 17 18 18 typedef struct TransportAddress { /* CHOICE */ ··· 364 364 Alerting_UUIE_fastStart fastStart; 365 365 } Alerting_UUIE; 366 366 367 - typedef struct Information_UUIE_fastStart { /* SEQUENCE OF */ 368 - int count; 369 - OpenLogicalChannel item[30]; 370 - } Information_UUIE_fastStart; 371 - 372 - typedef struct Information_UUIE { /* SEQUENCE */ 373 - enum { 374 - eInformation_UUIE_callIdentifier = (1 << 31), 375 - eInformation_UUIE_tokens = (1 << 30), 376 - eInformation_UUIE_cryptoTokens = (1 << 29), 377 - eInformation_UUIE_fastStart = (1 << 28), 378 - eInformation_UUIE_fastConnectRefused = (1 << 27), 379 - eInformation_UUIE_circuitInfo = (1 << 26), 380 - } options; 381 - Information_UUIE_fastStart fastStart; 382 - } Information_UUIE; 383 - 384 367 typedef struct FacilityReason { /* CHOICE */ 385 368 enum { 386 369 eFacilityReason_routeCallToGatekeeper, ··· 454 471 CallProceeding_UUIE callProceeding; 455 472 Connect_UUIE connect; 456 473 Alerting_UUIE alerting; 457 - Information_UUIE information; 458 474 Facility_UUIE facility; 459 475 Progress_UUIE progress; 460 476 }; ··· 543 561 } options; 544 562 OpenLogicalChannelAck_reverseLogicalChannelParameters 545 563 reverseLogicalChannelParameters; 564 + NetworkAccessParameters separateStack; 546 565 OpenLogicalChannelAck_forwardMultiplexAckParameters 547 566 forwardMultiplexAckParameters; 548 567 } OpenLogicalChannelAck;
+6 -2
include/net/bluetooth/l2cap.h
··· 129 129 __u8 data[0]; 130 130 } __attribute__ ((packed)); 131 131 132 - #define L2CAP_CONF_SUCCESS 0x00 133 - #define L2CAP_CONF_UNACCEPT 0x01 132 + #define L2CAP_CONF_SUCCESS 0x0000 133 + #define L2CAP_CONF_UNACCEPT 0x0001 134 + #define L2CAP_CONF_REJECT 0x0002 135 + #define L2CAP_CONF_UNKNOWN 0x0003 134 136 135 137 struct l2cap_conf_opt { 136 138 __u8 type; ··· 217 215 218 216 __u32 link_mode; 219 217 218 + __u8 conf_req[64]; 219 + __u8 conf_len; 220 220 __u8 conf_state; 221 221 __u8 conf_retry; 222 222 __u16 conf_mtu;
+7
include/net/dst.h
··· 265 265 { 266 266 return 0; 267 267 } 268 + static inline int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 269 + struct sock *sk, int flags) 270 + { 271 + return 0; 272 + } 268 273 #else 269 274 extern int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 270 275 struct sock *sk, int flags); 276 + extern int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 277 + struct sock *sk, int flags); 271 278 #endif 272 279 #endif 273 280
+3
include/net/ipv6.h
··· 469 469 extern int ip6_dst_lookup(struct sock *sk, 470 470 struct dst_entry **dst, 471 471 struct flowi *fl); 472 + extern int ip6_dst_blackhole(struct sock *sk, 473 + struct dst_entry **dst, 474 + struct flowi *fl); 472 475 extern int ip6_sk_dst_lookup(struct sock *sk, 473 476 struct dst_entry **dst, 474 477 struct flowi *fl);
+80 -64
net/bluetooth/l2cap.c
··· 507 507 } 508 508 509 509 /* Default config options */ 510 + pi->conf_len = 0; 510 511 pi->conf_mtu = L2CAP_DEFAULT_MTU; 511 512 pi->flush_to = L2CAP_DEFAULT_FLUSH_TO; 512 513 } ··· 1272 1271 return len; 1273 1272 } 1274 1273 1275 - static inline void l2cap_parse_conf_req(struct sock *sk, void *data, int len) 1276 - { 1277 - int type, hint, olen; 1278 - unsigned long val; 1279 - void *ptr = data; 1280 - 1281 - BT_DBG("sk %p len %d", sk, len); 1282 - 1283 - while (len >= L2CAP_CONF_OPT_SIZE) { 1284 - len -= l2cap_get_conf_opt(&ptr, &type, &olen, &val); 1285 - 1286 - hint = type & 0x80; 1287 - type &= 0x7f; 1288 - 1289 - switch (type) { 1290 - case L2CAP_CONF_MTU: 1291 - l2cap_pi(sk)->conf_mtu = val; 1292 - break; 1293 - 1294 - case L2CAP_CONF_FLUSH_TO: 1295 - l2cap_pi(sk)->flush_to = val; 1296 - break; 1297 - 1298 - case L2CAP_CONF_QOS: 1299 - break; 1300 - 1301 - default: 1302 - if (hint) 1303 - break; 1304 - 1305 - /* FIXME: Reject unknown option */ 1306 - break; 1307 - } 1308 - } 1309 - } 1310 - 1311 1274 static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) 1312 1275 { 1313 1276 struct l2cap_conf_opt *opt = *ptr; ··· 1323 1358 return ptr - data; 1324 1359 } 1325 1360 1326 - static inline int l2cap_conf_output(struct sock *sk, void **ptr) 1361 + static int l2cap_parse_conf_req(struct sock *sk, void *data) 1327 1362 { 1328 1363 struct l2cap_pinfo *pi = l2cap_pi(sk); 1329 - int result = 0; 1364 + struct l2cap_conf_rsp *rsp = data; 1365 + void *ptr = rsp->data; 1366 + void *req = pi->conf_req; 1367 + int len = pi->conf_len; 1368 + int type, hint, olen; 1369 + unsigned long val; 1370 + u16 result = L2CAP_CONF_SUCCESS; 1330 1371 1331 - /* Configure output options and let the other side know 1332 - * which ones we don't like. */ 1333 - if (pi->conf_mtu < pi->omtu) 1334 - result = L2CAP_CONF_UNACCEPT; 1335 - else 1336 - pi->omtu = pi->conf_mtu; 1372 + BT_DBG("sk %p", sk); 1337 1373 1338 - l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu); 1374 + while (len >= L2CAP_CONF_OPT_SIZE) { 1375 + len -= l2cap_get_conf_opt(&req, &type, &olen, &val); 1339 1376 1340 - BT_DBG("sk %p result %d", sk, result); 1341 - return result; 1377 + hint = type & 0x80; 1378 + type &= 0x7f; 1379 + 1380 + switch (type) { 1381 + case L2CAP_CONF_MTU: 1382 + pi->conf_mtu = val; 1383 + break; 1384 + 1385 + case L2CAP_CONF_FLUSH_TO: 1386 + pi->flush_to = val; 1387 + break; 1388 + 1389 + case L2CAP_CONF_QOS: 1390 + break; 1391 + 1392 + default: 1393 + if (hint) 1394 + break; 1395 + 1396 + result = L2CAP_CONF_UNKNOWN; 1397 + *((u8 *) ptr++) = type; 1398 + break; 1399 + } 1400 + } 1401 + 1402 + if (result == L2CAP_CONF_SUCCESS) { 1403 + /* Configure output options and let the other side know 1404 + * which ones we don't like. */ 1405 + 1406 + if (pi->conf_mtu < pi->omtu) 1407 + result = L2CAP_CONF_UNACCEPT; 1408 + else 1409 + pi->omtu = pi->conf_mtu; 1410 + 1411 + l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, pi->omtu); 1412 + } 1413 + 1414 + rsp->scid = cpu_to_le16(pi->dcid); 1415 + rsp->result = cpu_to_le16(result); 1416 + rsp->flags = cpu_to_le16(0x0000); 1417 + 1418 + return ptr - data; 1342 1419 } 1343 1420 1344 - static int l2cap_build_conf_rsp(struct sock *sk, void *data, int *result) 1421 + static int l2cap_build_conf_rsp(struct sock *sk, void *data, u16 result, u16 flags) 1345 1422 { 1346 1423 struct l2cap_conf_rsp *rsp = data; 1347 1424 void *ptr = rsp->data; 1348 - u16 flags = 0; 1349 1425 1350 - BT_DBG("sk %p complete %d", sk, result ? 1 : 0); 1351 - 1352 - if (result) 1353 - *result = l2cap_conf_output(sk, &ptr); 1354 - else 1355 - flags = 0x0001; 1426 + BT_DBG("sk %p", sk); 1356 1427 1357 1428 rsp->scid = cpu_to_le16(l2cap_pi(sk)->dcid); 1358 - rsp->result = cpu_to_le16(result ? *result : 0); 1429 + rsp->result = cpu_to_le16(result); 1359 1430 rsp->flags = cpu_to_le16(flags); 1360 1431 1361 1432 return ptr - data; ··· 1536 1535 u16 dcid, flags; 1537 1536 u8 rsp[64]; 1538 1537 struct sock *sk; 1539 - int result; 1538 + int len; 1540 1539 1541 1540 dcid = __le16_to_cpu(req->dcid); 1542 1541 flags = __le16_to_cpu(req->flags); ··· 1549 1548 if (sk->sk_state == BT_DISCONN) 1550 1549 goto unlock; 1551 1550 1552 - l2cap_parse_conf_req(sk, req->data, cmd->len - sizeof(*req)); 1551 + /* Reject if config buffer is too small. */ 1552 + len = cmd->len - sizeof(*req); 1553 + if (l2cap_pi(sk)->conf_len + len > sizeof(l2cap_pi(sk)->conf_req)) { 1554 + l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, 1555 + l2cap_build_conf_rsp(sk, rsp, 1556 + L2CAP_CONF_REJECT, flags), rsp); 1557 + goto unlock; 1558 + } 1559 + 1560 + /* Store config. */ 1561 + memcpy(l2cap_pi(sk)->conf_req + l2cap_pi(sk)->conf_len, req->data, len); 1562 + l2cap_pi(sk)->conf_len += len; 1553 1563 1554 1564 if (flags & 0x0001) { 1555 1565 /* Incomplete config. Send empty response. */ 1556 1566 l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, 1557 - l2cap_build_conf_rsp(sk, rsp, NULL), rsp); 1567 + l2cap_build_conf_rsp(sk, rsp, 1568 + L2CAP_CONF_SUCCESS, 0x0001), rsp); 1558 1569 goto unlock; 1559 1570 } 1560 1571 1561 1572 /* Complete config. */ 1562 - l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, 1563 - l2cap_build_conf_rsp(sk, rsp, &result), rsp); 1564 - 1565 - if (result) 1573 + len = l2cap_parse_conf_req(sk, rsp); 1574 + if (len < 0) 1566 1575 goto unlock; 1567 1576 1568 - /* Output config done */ 1577 + l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, len, rsp); 1578 + 1579 + /* Output config done. */ 1569 1580 l2cap_pi(sk)->conf_state |= L2CAP_CONF_OUTPUT_DONE; 1581 + 1582 + /* Reset config buffer. */ 1583 + l2cap_pi(sk)->conf_len = 0; 1570 1584 1571 1585 if (l2cap_pi(sk)->conf_state & L2CAP_CONF_INPUT_DONE) { 1572 1586 sk->sk_state = BT_CONNECTED;
+12
net/core/sock.c
··· 206 206 return -EINVAL; 207 207 if (copy_from_user(&tv, optval, sizeof(tv))) 208 208 return -EFAULT; 209 + if (tv.tv_usec < 0 || tv.tv_usec >= USEC_PER_SEC) 210 + return -EDOM; 209 211 212 + if (tv.tv_sec < 0) { 213 + static int warned = 0; 214 + *timeo_p = 0; 215 + if (warned < 10 && net_ratelimit()) 216 + warned++; 217 + printk(KERN_INFO "sock_set_timeout: `%s' (pid %d) " 218 + "tries to set negative timeout\n", 219 + current->comm, current->pid); 220 + return 0; 221 + } 210 222 *timeo_p = MAX_SCHEDULE_TIMEOUT; 211 223 if (tv.tv_sec == 0 && tv.tv_usec == 0) 212 224 return 0;
+9
net/core/sysctl_net_core.c
··· 24 24 #ifdef CONFIG_XFRM 25 25 extern u32 sysctl_xfrm_aevent_etime; 26 26 extern u32 sysctl_xfrm_aevent_rseqth; 27 + extern int sysctl_xfrm_larval_drop; 27 28 #endif 28 29 29 30 ctl_table core_table[] = { ··· 116 115 .procname = "xfrm_aevent_rseqth", 117 116 .data = &sysctl_xfrm_aevent_rseqth, 118 117 .maxlen = sizeof(u32), 118 + .mode = 0644, 119 + .proc_handler = &proc_dointvec 120 + }, 121 + { 122 + .ctl_name = CTL_UNNUMBERED, 123 + .procname = "xfrm_larval_drop", 124 + .data = &sysctl_xfrm_larval_drop, 125 + .maxlen = sizeof(int), 119 126 .mode = 0644, 120 127 .proc_handler = &proc_dointvec 121 128 },
+7 -8
net/dccp/Kconfig
··· 1 - menu "DCCP Configuration (EXPERIMENTAL)" 2 - depends on INET && EXPERIMENTAL 3 - 4 - config IP_DCCP 1 + menuconfig IP_DCCP 5 2 tristate "The DCCP Protocol (EXPERIMENTAL)" 3 + depends on INET && EXPERIMENTAL 6 4 ---help--- 7 5 Datagram Congestion Control Protocol (RFC 4340) 8 6 ··· 17 19 18 20 If in doubt, say N. 19 21 22 + if IP_DCCP 23 + 20 24 config INET_DCCP_DIAG 21 - depends on IP_DCCP && INET_DIAG 25 + depends on INET_DIAG 22 26 def_tristate y if (IP_DCCP = y && INET_DIAG = y) 23 27 def_tristate m 24 28 25 29 config IP_DCCP_ACKVEC 26 - depends on IP_DCCP 27 30 bool 28 31 29 32 source "net/dccp/ccids/Kconfig" 30 33 31 34 menu "DCCP Kernel Hacking" 32 - depends on IP_DCCP && DEBUG_KERNEL=y 35 + depends on DEBUG_KERNEL=y 33 36 34 37 config IP_DCCP_DEBUG 35 38 bool "DCCP debug messages" ··· 60 61 61 62 endmenu 62 63 63 - endmenu 64 + endif # IP_DDCP
+1 -2
net/dccp/ccids/ccid3.c
··· 419 419 420 420 static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) 421 421 { 422 - const struct dccp_sock *dp = dccp_sk(sk); 423 422 struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); 424 423 struct ccid3_options_received *opt_recv; 425 424 struct dccp_tx_hist_entry *packet; ··· 490 491 ccid3_pr_debug("%s(%p), s=%u, MSS=%u, " 491 492 "R_sample=%uus, X=%u\n", dccp_role(sk), 492 493 sk, hctx->ccid3hctx_s, 493 - dp->dccps_mss_cache, r_sample, 494 + dccp_sk(sk)->dccps_mss_cache, r_sample, 494 495 (unsigned)(hctx->ccid3hctx_x >> 6)); 495 496 496 497 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
+7 -3
net/dccp/ipv6.c
··· 1043 1043 if (final_p) 1044 1044 ipv6_addr_copy(&fl.fl6_dst, final_p); 1045 1045 1046 - err = xfrm_lookup(&dst, &fl, sk, 1); 1047 - if (err < 0) 1048 - goto failure; 1046 + err = __xfrm_lookup(&dst, &fl, sk, 1); 1047 + if (err < 0) { 1048 + if (err == -EREMOTE) 1049 + err = ip6_dst_blackhole(sk, &dst, &fl); 1050 + if (err < 0) 1051 + goto failure; 1052 + } 1049 1053 1050 1054 if (saddr == NULL) { 1051 1055 saddr = &fl.fl6_src;
+4 -2
net/ipv4/fib_hash.c
··· 456 456 fib_release_info(fi_drop); 457 457 if (state & FA_S_ACCESSED) 458 458 rt_cache_flush(-1); 459 + rtmsg_fib(RTM_NEWROUTE, key, fa, cfg->fc_dst_len, tb->tb_id, 460 + &cfg->fc_nlinfo, NLM_F_REPLACE); 459 461 return 0; 460 462 } 461 463 ··· 525 523 rt_cache_flush(-1); 526 524 527 525 rtmsg_fib(RTM_NEWROUTE, key, new_fa, cfg->fc_dst_len, tb->tb_id, 528 - &cfg->fc_nlinfo); 526 + &cfg->fc_nlinfo, 0); 529 527 return 0; 530 528 531 529 out_free_new_fa: ··· 591 589 592 590 fa = fa_to_delete; 593 591 rtmsg_fib(RTM_DELROUTE, key, fa, cfg->fc_dst_len, 594 - tb->tb_id, &cfg->fc_nlinfo); 592 + tb->tb_id, &cfg->fc_nlinfo, 0); 595 593 596 594 kill_fn = 0; 597 595 write_lock_bh(&fib_hash_lock);
+2 -1
net/ipv4/fib_lookup.h
··· 30 30 int dst_len, u8 tos, struct fib_info *fi, 31 31 unsigned int); 32 32 extern void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, 33 - int dst_len, u32 tb_id, struct nl_info *info); 33 + int dst_len, u32 tb_id, struct nl_info *info, 34 + unsigned int nlm_flags); 34 35 extern struct fib_alias *fib_find_alias(struct list_head *fah, 35 36 u8 tos, u32 prio); 36 37 extern int fib_detect_death(struct fib_info *fi, int order,
+3 -2
net/ipv4/fib_semantics.c
··· 301 301 } 302 302 303 303 void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, 304 - int dst_len, u32 tb_id, struct nl_info *info) 304 + int dst_len, u32 tb_id, struct nl_info *info, 305 + unsigned int nlm_flags) 305 306 { 306 307 struct sk_buff *skb; 307 308 u32 seq = info->nlh ? info->nlh->nlmsg_seq : 0; ··· 314 313 315 314 err = fib_dump_info(skb, info->pid, seq, event, tb_id, 316 315 fa->fa_type, fa->fa_scope, key, dst_len, 317 - fa->fa_tos, fa->fa_info, 0); 316 + fa->fa_tos, fa->fa_info, nlm_flags); 318 317 if (err < 0) { 319 318 /* -EMSGSIZE implies BUG in fib_nlmsg_size() */ 320 319 WARN_ON(err == -EMSGSIZE);
+4 -2
net/ipv4/fib_trie.c
··· 1226 1226 fib_release_info(fi_drop); 1227 1227 if (state & FA_S_ACCESSED) 1228 1228 rt_cache_flush(-1); 1229 + rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, 1230 + tb->tb_id, &cfg->fc_nlinfo, NLM_F_REPLACE); 1229 1231 1230 1232 goto succeeded; 1231 1233 } ··· 1280 1278 1281 1279 rt_cache_flush(-1); 1282 1280 rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, tb->tb_id, 1283 - &cfg->fc_nlinfo); 1281 + &cfg->fc_nlinfo, 0); 1284 1282 succeeded: 1285 1283 return 0; 1286 1284 ··· 1626 1624 1627 1625 fa = fa_to_delete; 1628 1626 rtmsg_fib(RTM_DELROUTE, htonl(key), fa, plen, tb->tb_id, 1629 - &cfg->fc_nlinfo); 1627 + &cfg->fc_nlinfo, 0); 1630 1628 1631 1629 l = fib_find_node(t, key); 1632 1630 li = find_leaf_info(l, plen);
+5 -25
net/ipv4/ipvs/Kconfig
··· 1 1 # 2 2 # IP Virtual Server configuration 3 3 # 4 - menu "IP: Virtual Server Configuration" 5 - depends on NETFILTER 6 - 7 - config IP_VS 4 + menuconfig IP_VS 8 5 tristate "IP virtual server support (EXPERIMENTAL)" 9 6 depends on NETFILTER 10 7 ---help--- ··· 22 25 If you want to compile it in kernel, say Y. To compile it as a 23 26 module, choose M here. If unsure, say N. 24 27 28 + if IP_VS 29 + 25 30 config IP_VS_DEBUG 26 31 bool "IP virtual server debugging" 27 - depends on IP_VS 28 32 ---help--- 29 33 Say Y here if you want to get additional messages useful in 30 34 debugging the IP virtual server code. You can change the debug ··· 33 35 34 36 config IP_VS_TAB_BITS 35 37 int "IPVS connection table size (the Nth power of 2)" 36 - depends on IP_VS 37 38 default "12" 38 39 ---help--- 39 40 The IPVS connection hash table uses the chaining scheme to handle ··· 58 61 needed for your box. 59 62 60 63 comment "IPVS transport protocol load balancing support" 61 - depends on IP_VS 62 64 63 65 config IP_VS_PROTO_TCP 64 66 bool "TCP load balancing support" 65 - depends on IP_VS 66 67 ---help--- 67 68 This option enables support for load balancing TCP transport 68 69 protocol. Say Y if unsure. 69 70 70 71 config IP_VS_PROTO_UDP 71 72 bool "UDP load balancing support" 72 - depends on IP_VS 73 73 ---help--- 74 74 This option enables support for load balancing UDP transport 75 75 protocol. Say Y if unsure. 76 76 77 77 config IP_VS_PROTO_ESP 78 78 bool "ESP load balancing support" 79 - depends on IP_VS 80 79 ---help--- 81 80 This option enables support for load balancing ESP (Encapsulation 82 81 Security Payload) transport protocol. Say Y if unsure. 83 82 84 83 config IP_VS_PROTO_AH 85 84 bool "AH load balancing support" 86 - depends on IP_VS 87 85 ---help--- 88 86 This option enables support for load balancing AH (Authentication 89 87 Header) transport protocol. Say Y if unsure. 90 88 91 89 comment "IPVS scheduler" 92 - depends on IP_VS 93 90 94 91 config IP_VS_RR 95 92 tristate "round-robin scheduling" 96 - depends on IP_VS 97 93 ---help--- 98 94 The robin-robin scheduling algorithm simply directs network 99 95 connections to different real servers in a round-robin manner. ··· 96 106 97 107 config IP_VS_WRR 98 108 tristate "weighted round-robin scheduling" 99 - depends on IP_VS 100 109 ---help--- 101 110 The weighted robin-robin scheduling algorithm directs network 102 111 connections to different real servers based on server weights ··· 109 120 110 121 config IP_VS_LC 111 122 tristate "least-connection scheduling" 112 - depends on IP_VS 113 123 ---help--- 114 124 The least-connection scheduling algorithm directs network 115 125 connections to the server with the least number of active ··· 119 131 120 132 config IP_VS_WLC 121 133 tristate "weighted least-connection scheduling" 122 - depends on IP_VS 123 134 ---help--- 124 135 The weighted least-connection scheduling algorithm directs network 125 136 connections to the server with the least active connections ··· 129 142 130 143 config IP_VS_LBLC 131 144 tristate "locality-based least-connection scheduling" 132 - depends on IP_VS 133 145 ---help--- 134 146 The locality-based least-connection scheduling algorithm is for 135 147 destination IP load balancing. It is usually used in cache cluster. ··· 143 157 144 158 config IP_VS_LBLCR 145 159 tristate "locality-based least-connection with replication scheduling" 146 - depends on IP_VS 147 160 ---help--- 148 161 The locality-based least-connection with replication scheduling 149 162 algorithm is also for destination IP load balancing. It is ··· 161 176 162 177 config IP_VS_DH 163 178 tristate "destination hashing scheduling" 164 - depends on IP_VS 165 179 ---help--- 166 180 The destination hashing scheduling algorithm assigns network 167 181 connections to the servers through looking up a statically assigned ··· 171 187 172 188 config IP_VS_SH 173 189 tristate "source hashing scheduling" 174 - depends on IP_VS 175 190 ---help--- 176 191 The source hashing scheduling algorithm assigns network 177 192 connections to the servers through looking up a statically assigned ··· 181 198 182 199 config IP_VS_SED 183 200 tristate "shortest expected delay scheduling" 184 - depends on IP_VS 185 201 ---help--- 186 202 The shortest expected delay scheduling algorithm assigns network 187 203 connections to the server with the shortest expected delay. The ··· 194 212 195 213 config IP_VS_NQ 196 214 tristate "never queue scheduling" 197 - depends on IP_VS 198 215 ---help--- 199 216 The never queue scheduling algorithm adopts a two-speed model. 200 217 When there is an idle server available, the job will be sent to ··· 206 225 module, choose M here. If unsure, say N. 207 226 208 227 comment 'IPVS application helper' 209 - depends on IP_VS 210 228 211 229 config IP_VS_FTP 212 230 tristate "FTP protocol helper" 213 - depends on IP_VS && IP_VS_PROTO_TCP 231 + depends on IP_VS_PROTO_TCP 214 232 ---help--- 215 233 FTP is a protocol that transfers IP address and/or port number in 216 234 the payload. In the virtual server via Network Address Translation, ··· 221 241 If you want to compile it in kernel, say Y. To compile it as a 222 242 module, choose M here. If unsure, say N. 223 243 224 - endmenu 244 + endif # IP_VS
+6 -14
net/ipv4/netfilter/nf_nat_ftp.c
··· 40 40 unsigned int matchoff, 41 41 unsigned int matchlen, 42 42 struct nf_conn *ct, 43 - enum ip_conntrack_info ctinfo, 44 - u32 *seq) 43 + enum ip_conntrack_info ctinfo) 45 44 { 46 45 char buffer[sizeof("nnn,nnn,nnn,nnn,nnn,nnn")]; 47 46 ··· 49 50 50 51 DEBUGP("calling nf_nat_mangle_tcp_packet\n"); 51 52 52 - *seq += strlen(buffer) - matchlen; 53 53 return nf_nat_mangle_tcp_packet(pskb, ct, ctinfo, matchoff, 54 54 matchlen, buffer, strlen(buffer)); 55 55 } ··· 61 63 unsigned int matchoff, 62 64 unsigned int matchlen, 63 65 struct nf_conn *ct, 64 - enum ip_conntrack_info ctinfo, 65 - u32 *seq) 66 + enum ip_conntrack_info ctinfo) 66 67 { 67 68 char buffer[sizeof("|1|255.255.255.255|65535|")]; 68 69 ··· 69 72 70 73 DEBUGP("calling nf_nat_mangle_tcp_packet\n"); 71 74 72 - *seq += strlen(buffer) - matchlen; 73 75 return nf_nat_mangle_tcp_packet(pskb, ct, ctinfo, matchoff, 74 76 matchlen, buffer, strlen(buffer)); 75 77 } ··· 81 85 unsigned int matchoff, 82 86 unsigned int matchlen, 83 87 struct nf_conn *ct, 84 - enum ip_conntrack_info ctinfo, 85 - u32 *seq) 88 + enum ip_conntrack_info ctinfo) 86 89 { 87 90 char buffer[sizeof("|||65535|")]; 88 91 ··· 89 94 90 95 DEBUGP("calling nf_nat_mangle_tcp_packet\n"); 91 96 92 - *seq += strlen(buffer) - matchlen; 93 97 return nf_nat_mangle_tcp_packet(pskb, ct, ctinfo, matchoff, 94 98 matchlen, buffer, strlen(buffer)); 95 99 } 96 100 97 101 static int (*mangle[])(struct sk_buff **, __be32, u_int16_t, 98 102 unsigned int, unsigned int, struct nf_conn *, 99 - enum ip_conntrack_info, u32 *seq) 103 + enum ip_conntrack_info) 100 104 = { 101 105 [NF_CT_FTP_PORT] = mangle_rfc959_packet, 102 106 [NF_CT_FTP_PASV] = mangle_rfc959_packet, ··· 110 116 enum nf_ct_ftp_type type, 111 117 unsigned int matchoff, 112 118 unsigned int matchlen, 113 - struct nf_conntrack_expect *exp, 114 - u32 *seq) 119 + struct nf_conntrack_expect *exp) 115 120 { 116 121 __be32 newip; 117 122 u_int16_t port; ··· 138 145 if (port == 0) 139 146 return NF_DROP; 140 147 141 - if (!mangle[type](pskb, newip, port, matchoff, matchlen, ct, ctinfo, 142 - seq)) { 148 + if (!mangle[type](pskb, newip, port, matchoff, matchlen, ct, ctinfo)) { 143 149 nf_conntrack_unexpect_related(exp); 144 150 return NF_DROP; 145 151 }
+3 -3
net/ipv4/netfilter/nf_nat_h323.c
··· 455 455 if (idx > 0 && 456 456 get_h225_addr(ct, *data, &taddr[0], &addr, &port) && 457 457 (ntohl(addr.ip) & 0xff000000) == 0x7f000000) { 458 - set_h225_addr_hook(pskb, data, 0, &taddr[0], 459 - &ct->tuplehash[!dir].tuple.dst.u3, 460 - info->sig_port[!dir]); 458 + set_h225_addr(pskb, data, 0, &taddr[0], 459 + &ct->tuplehash[!dir].tuple.dst.u3, 460 + info->sig_port[!dir]); 461 461 } 462 462 } else { 463 463 nf_conntrack_unexpect_related(exp);
+70 -1
net/ipv4/route.c
··· 2598 2598 2599 2599 EXPORT_SYMBOL_GPL(__ip_route_output_key); 2600 2600 2601 + static void ipv4_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) 2602 + { 2603 + } 2604 + 2605 + static struct dst_ops ipv4_dst_blackhole_ops = { 2606 + .family = AF_INET, 2607 + .protocol = __constant_htons(ETH_P_IP), 2608 + .destroy = ipv4_dst_destroy, 2609 + .check = ipv4_dst_check, 2610 + .update_pmtu = ipv4_rt_blackhole_update_pmtu, 2611 + .entry_size = sizeof(struct rtable), 2612 + }; 2613 + 2614 + 2615 + static int ipv4_blackhole_output(struct sk_buff *skb) 2616 + { 2617 + kfree_skb(skb); 2618 + return 0; 2619 + } 2620 + 2621 + static int ipv4_dst_blackhole(struct rtable **rp, struct flowi *flp, struct sock *sk) 2622 + { 2623 + struct rtable *ort = *rp; 2624 + struct rtable *rt = (struct rtable *) 2625 + dst_alloc(&ipv4_dst_blackhole_ops); 2626 + 2627 + if (rt) { 2628 + struct dst_entry *new = &rt->u.dst; 2629 + 2630 + atomic_set(&new->__refcnt, 1); 2631 + new->__use = 1; 2632 + new->input = ipv4_blackhole_output; 2633 + new->output = ipv4_blackhole_output; 2634 + memcpy(new->metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); 2635 + 2636 + new->dev = ort->u.dst.dev; 2637 + if (new->dev) 2638 + dev_hold(new->dev); 2639 + 2640 + rt->fl = ort->fl; 2641 + 2642 + rt->idev = ort->idev; 2643 + if (rt->idev) 2644 + in_dev_hold(rt->idev); 2645 + rt->rt_flags = ort->rt_flags; 2646 + rt->rt_type = ort->rt_type; 2647 + rt->rt_dst = ort->rt_dst; 2648 + rt->rt_src = ort->rt_src; 2649 + rt->rt_iif = ort->rt_iif; 2650 + rt->rt_gateway = ort->rt_gateway; 2651 + rt->rt_spec_dst = ort->rt_spec_dst; 2652 + rt->peer = ort->peer; 2653 + if (rt->peer) 2654 + atomic_inc(&rt->peer->refcnt); 2655 + 2656 + dst_free(new); 2657 + } 2658 + 2659 + dst_release(&(*rp)->u.dst); 2660 + *rp = rt; 2661 + return (rt ? 0 : -ENOMEM); 2662 + } 2663 + 2601 2664 int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags) 2602 2665 { 2603 2666 int err; ··· 2673 2610 flp->fl4_src = (*rp)->rt_src; 2674 2611 if (!flp->fl4_dst) 2675 2612 flp->fl4_dst = (*rp)->rt_dst; 2676 - return xfrm_lookup((struct dst_entry **)rp, flp, sk, flags); 2613 + err = __xfrm_lookup((struct dst_entry **)rp, flp, sk, flags); 2614 + if (err == -EREMOTE) 2615 + err = ipv4_dst_blackhole(rp, flp, sk); 2616 + 2617 + return err; 2677 2618 } 2678 2619 2679 2620 return 0; ··· 3205 3138 ipv4_dst_ops.kmem_cachep = 3206 3139 kmem_cache_create("ip_dst_cache", sizeof(struct rtable), 0, 3207 3140 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 3141 + 3142 + ipv4_dst_blackhole_ops.kmem_cachep = ipv4_dst_ops.kmem_cachep; 3208 3143 3209 3144 rt_hash_table = (struct rt_hash_bucket *) 3210 3145 alloc_large_system_hash("IP route cache",
+21 -10
net/ipv6/addrconf.c
··· 2154 2154 2155 2155 ASSERT_RTNL(); 2156 2156 2157 - if ((dev->type != ARPHRD_ETHER) && 2158 - (dev->type != ARPHRD_FDDI) && 2159 - (dev->type != ARPHRD_IEEE802_TR) && 2160 - (dev->type != ARPHRD_ARCNET) && 2161 - (dev->type != ARPHRD_INFINIBAND)) { 2162 - /* Alas, we support only Ethernet autoconfiguration. */ 2163 - return; 2164 - } 2165 - 2166 2157 idev = addrconf_add_dev(dev); 2167 2158 if (idev == NULL) 2168 2159 return; ··· 2241 2250 ip6_tnl_add_linklocal(idev); 2242 2251 } 2243 2252 2253 + static int ipv6_hwtype(struct net_device *dev) 2254 + { 2255 + if ((dev->type == ARPHRD_ETHER) || 2256 + (dev->type == ARPHRD_LOOPBACK) || 2257 + (dev->type == ARPHRD_SIT) || 2258 + (dev->type == ARPHRD_TUNNEL6) || 2259 + (dev->type == ARPHRD_FDDI) || 2260 + (dev->type == ARPHRD_IEEE802_TR) || 2261 + (dev->type == ARPHRD_ARCNET) || 2262 + (dev->type == ARPHRD_INFINIBAND)) 2263 + return 1; 2264 + 2265 + return 0; 2266 + } 2267 + 2244 2268 static int addrconf_notify(struct notifier_block *this, unsigned long event, 2245 2269 void * data) 2246 2270 { 2247 2271 struct net_device *dev = (struct net_device *) data; 2248 - struct inet6_dev *idev = __in6_dev_get(dev); 2272 + struct inet6_dev *idev; 2249 2273 int run_pending = 0; 2274 + 2275 + if (!ipv6_hwtype(dev)) 2276 + return NOTIFY_OK; 2277 + 2278 + idev = __in6_dev_get(dev); 2250 2279 2251 2280 switch(event) { 2252 2281 case NETDEV_REGISTER:
+6 -2
net/ipv6/datagram.c
··· 177 177 if (final_p) 178 178 ipv6_addr_copy(&fl.fl6_dst, final_p); 179 179 180 - if ((err = xfrm_lookup(&dst, &fl, sk, 1)) < 0) 181 - goto out; 180 + if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { 181 + if (err == -EREMOTE) 182 + err = ip6_dst_blackhole(sk, &dst, &fl); 183 + if (err < 0) 184 + goto out; 185 + } 182 186 183 187 /* source address lookup done in ip6_dst_lookup */ 184 188
+6 -2
net/ipv6/raw.c
··· 818 818 if (final_p) 819 819 ipv6_addr_copy(&fl.fl6_dst, final_p); 820 820 821 - if ((err = xfrm_lookup(&dst, &fl, sk, 1)) < 0) 822 - goto out; 821 + if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { 822 + if (err == -EREMOTE) 823 + err = ip6_dst_blackhole(sk, &dst, &fl); 824 + if (err < 0) 825 + goto out; 826 + } 823 827 824 828 if (hlimit < 0) { 825 829 if (ipv6_addr_is_multicast(&fl.fl6_dst))
+63
net/ipv6/route.c
··· 119 119 .entry_size = sizeof(struct rt6_info), 120 120 }; 121 121 122 + static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) 123 + { 124 + } 125 + 126 + static struct dst_ops ip6_dst_blackhole_ops = { 127 + .family = AF_INET6, 128 + .protocol = __constant_htons(ETH_P_IPV6), 129 + .destroy = ip6_dst_destroy, 130 + .check = ip6_dst_check, 131 + .update_pmtu = ip6_rt_blackhole_update_pmtu, 132 + .entry_size = sizeof(struct rt6_info), 133 + }; 134 + 122 135 struct rt6_info ip6_null_entry = { 123 136 .u = { 124 137 .dst = { ··· 845 832 } 846 833 847 834 EXPORT_SYMBOL(ip6_route_output); 835 + 836 + static int ip6_blackhole_output(struct sk_buff *skb) 837 + { 838 + kfree_skb(skb); 839 + return 0; 840 + } 841 + 842 + int ip6_dst_blackhole(struct sock *sk, struct dst_entry **dstp, struct flowi *fl) 843 + { 844 + struct rt6_info *ort = (struct rt6_info *) *dstp; 845 + struct rt6_info *rt = (struct rt6_info *) 846 + dst_alloc(&ip6_dst_blackhole_ops); 847 + struct dst_entry *new = NULL; 848 + 849 + if (rt) { 850 + new = &rt->u.dst; 851 + 852 + atomic_set(&new->__refcnt, 1); 853 + new->__use = 1; 854 + new->input = ip6_blackhole_output; 855 + new->output = ip6_blackhole_output; 856 + 857 + memcpy(new->metrics, ort->u.dst.metrics, RTAX_MAX*sizeof(u32)); 858 + new->dev = ort->u.dst.dev; 859 + if (new->dev) 860 + dev_hold(new->dev); 861 + rt->rt6i_idev = ort->rt6i_idev; 862 + if (rt->rt6i_idev) 863 + in6_dev_hold(rt->rt6i_idev); 864 + rt->rt6i_expires = 0; 865 + 866 + ipv6_addr_copy(&rt->rt6i_gateway, &ort->rt6i_gateway); 867 + rt->rt6i_flags = ort->rt6i_flags & ~RTF_EXPIRES; 868 + rt->rt6i_metric = 0; 869 + 870 + memcpy(&rt->rt6i_dst, &ort->rt6i_dst, sizeof(struct rt6key)); 871 + #ifdef CONFIG_IPV6_SUBTREES 872 + memcpy(&rt->rt6i_src, &ort->rt6i_src, sizeof(struct rt6key)); 873 + #endif 874 + 875 + dst_free(new); 876 + } 877 + 878 + dst_release(*dstp); 879 + *dstp = new; 880 + return (new ? 0 : -ENOMEM); 881 + } 882 + EXPORT_SYMBOL_GPL(ip6_dst_blackhole); 848 883 849 884 /* 850 885 * Destination cache support functions ··· 2556 2495 ip6_dst_ops.kmem_cachep = 2557 2496 kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, 2558 2497 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL); 2498 + ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; 2499 + 2559 2500 fib6_init(); 2560 2501 #ifdef CONFIG_PROC_FS 2561 2502 p = proc_net_create("ipv6_route", 0, rt6_proc_info);
+6 -2
net/ipv6/tcp_ipv6.c
··· 265 265 if (final_p) 266 266 ipv6_addr_copy(&fl.fl6_dst, final_p); 267 267 268 - if ((err = xfrm_lookup(&dst, &fl, sk, 1)) < 0) 269 - goto failure; 268 + if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { 269 + if (err == -EREMOTE) 270 + err = ip6_dst_blackhole(sk, &dst, &fl); 271 + if (err < 0) 272 + goto failure; 273 + } 270 274 271 275 if (saddr == NULL) { 272 276 saddr = &fl.fl6_src;
+6 -2
net/ipv6/udp.c
··· 767 767 if (final_p) 768 768 ipv6_addr_copy(&fl.fl6_dst, final_p); 769 769 770 - if ((err = xfrm_lookup(&dst, &fl, sk, 1)) < 0) 771 - goto out; 770 + if ((err = __xfrm_lookup(&dst, &fl, sk, 1)) < 0) { 771 + if (err == -EREMOTE) 772 + err = ip6_dst_blackhole(sk, &dst, &fl); 773 + if (err < 0) 774 + goto out; 775 + } 772 776 773 777 if (hlimit < 0) { 774 778 if (ipv6_addr_is_multicast(&fl.fl6_dst))
+7 -6
net/netfilter/nf_conntrack_ftp.c
··· 48 48 enum nf_ct_ftp_type type, 49 49 unsigned int matchoff, 50 50 unsigned int matchlen, 51 - struct nf_conntrack_expect *exp, 52 - u32 *seq); 51 + struct nf_conntrack_expect *exp); 53 52 EXPORT_SYMBOL_GPL(nf_nat_ftp_hook); 54 53 55 54 #if 0 ··· 334 335 if (info->seq_aft_nl[dir][i] == nl_seq) 335 336 return; 336 337 337 - if (oldest == info->seq_aft_nl_num[dir] 338 - || before(info->seq_aft_nl[dir][i], oldest)) 338 + if (oldest == info->seq_aft_nl_num[dir] || 339 + before(info->seq_aft_nl[dir][i], 340 + info->seq_aft_nl[dir][oldest])) 339 341 oldest = i; 340 342 } 341 343 342 344 if (info->seq_aft_nl_num[dir] < NUM_SEQ_TO_REMEMBER) { 343 345 info->seq_aft_nl[dir][info->seq_aft_nl_num[dir]++] = nl_seq; 344 346 nf_conntrack_event_cache(IPCT_HELPINFO_VOLATILE, skb); 345 - } else if (oldest != NUM_SEQ_TO_REMEMBER) { 347 + } else if (oldest != NUM_SEQ_TO_REMEMBER && 348 + after(nl_seq, info->seq_aft_nl[dir][oldest])) { 346 349 info->seq_aft_nl[dir][oldest] = nl_seq; 347 350 nf_conntrack_event_cache(IPCT_HELPINFO_VOLATILE, skb); 348 351 } ··· 520 519 nf_nat_ftp = rcu_dereference(nf_nat_ftp_hook); 521 520 if (nf_nat_ftp && ct->status & IPS_NAT_MASK) 522 521 ret = nf_nat_ftp(pskb, ctinfo, search[dir][i].ftptype, 523 - matchoff, matchlen, exp, &seq); 522 + matchoff, matchlen, exp); 524 523 else { 525 524 /* Can't expect this? Best to drop packet now. */ 526 525 if (nf_conntrack_expect_related(exp) != 0)
+11 -30
net/netfilter/nf_conntrack_h323_main.c
··· 520 520 } 521 521 } 522 522 523 + if ((olca->options & eOpenLogicalChannelAck_separateStack) && 524 + olca->separateStack.networkAddress.choice == 525 + eNetworkAccessParameters_networkAddress_localAreaAddress) { 526 + ret = expect_t120(pskb, ct, ctinfo, data, dataoff, 527 + &olca->separateStack.networkAddress. 528 + localAreaAddress); 529 + if (ret < 0) 530 + return -1; 531 + } 532 + 523 533 return 0; 524 534 } 525 535 ··· 650 640 case eTransportAddress_ip6Address: 651 641 if (family != AF_INET6) 652 642 return 0; 653 - p = data + taddr->ip6Address.ip6; 643 + p = data + taddr->ip6Address.ip; 654 644 len = 16; 655 645 break; 656 646 default: ··· 987 977 } 988 978 989 979 /****************************************************************************/ 990 - static int process_information(struct sk_buff **pskb, 991 - struct nf_conn *ct, 992 - enum ip_conntrack_info ctinfo, 993 - unsigned char **data, int dataoff, 994 - Information_UUIE *info) 995 - { 996 - int ret; 997 - int i; 998 - 999 - DEBUGP("nf_ct_q931: Information\n"); 1000 - 1001 - if (info->options & eInformation_UUIE_fastStart) { 1002 - for (i = 0; i < info->fastStart.count; i++) { 1003 - ret = process_olc(pskb, ct, ctinfo, data, dataoff, 1004 - &info->fastStart.item[i]); 1005 - if (ret < 0) 1006 - return -1; 1007 - } 1008 - } 1009 - 1010 - return 0; 1011 - } 1012 - 1013 - /****************************************************************************/ 1014 980 static int process_facility(struct sk_buff **pskb, struct nf_conn *ct, 1015 981 enum ip_conntrack_info ctinfo, 1016 982 unsigned char **data, int dataoff, ··· 1081 1095 case eH323_UU_PDU_h323_message_body_alerting: 1082 1096 ret = process_alerting(pskb, ct, ctinfo, data, dataoff, 1083 1097 &pdu->h323_message_body.alerting); 1084 - break; 1085 - case eH323_UU_PDU_h323_message_body_information: 1086 - ret = process_information(pskb, ct, ctinfo, data, dataoff, 1087 - &pdu->h323_message_body. 1088 - information); 1089 1098 break; 1090 1099 case eH323_UU_PDU_h323_message_body_facility: 1091 1100 ret = process_facility(pskb, ct, ctinfo, data, dataoff,
+13 -18
net/netfilter/nf_conntrack_h323_types.c
··· 1 - /* Generated by Jing Min Zhao's ASN.1 parser, Apr 20 2006 1 + /* Generated by Jing Min Zhao's ASN.1 parser, May 16 2007 2 2 * 3 3 * Copyright (c) 2006 Jing Min Zhao <zhaojingmin@users.sourceforge.net> 4 4 * ··· 37 37 38 38 static field_t _TransportAddress_ip6Address[] = { /* SEQUENCE */ 39 39 {FNAME("ip") OCTSTR, FIXD, 16, 0, DECODE, 40 - offsetof(TransportAddress_ip6Address, ip6), NULL}, 40 + offsetof(TransportAddress_ip6Address, ip), NULL}, 41 41 {FNAME("port") INT, WORD, 0, 0, SKIP, 0, NULL}, 42 42 }; 43 43 ··· 67 67 {FNAME("ipxAddress") SEQ, 0, 3, 3, SKIP, 0, 68 68 _TransportAddress_ipxAddress}, 69 69 {FNAME("ip6Address") SEQ, 0, 2, 2, DECODE | EXT, 70 - offsetof(TransportAddress, ip6Address), _TransportAddress_ip6Address}, 70 + offsetof(TransportAddress, ip6Address), 71 + _TransportAddress_ip6Address}, 71 72 {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 72 73 {FNAME("nsap") OCTSTR, 5, 1, 0, SKIP, 0, NULL}, 73 74 {FNAME("nonStandardAddress") SEQ, 0, 2, 2, SKIP, 0, ··· 639 638 }; 640 639 641 640 static field_t _UnicastAddress_iP6Address[] = { /* SEQUENCE */ 642 - {FNAME("network") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 641 + {FNAME("network") OCTSTR, FIXD, 16, 0, DECODE, 642 + offsetof(UnicastAddress_iP6Address, network), NULL}, 643 643 {FNAME("tsapIdentifier") INT, WORD, 0, 0, SKIP, 0, NULL}, 644 644 }; 645 645 ··· 667 665 offsetof(UnicastAddress, iPAddress), _UnicastAddress_iPAddress}, 668 666 {FNAME("iPXAddress") SEQ, 0, 3, 3, SKIP | EXT, 0, 669 667 _UnicastAddress_iPXAddress}, 670 - {FNAME("iP6Address") SEQ, 0, 2, 2, SKIP | EXT, 0, 671 - _UnicastAddress_iP6Address}, 668 + {FNAME("iP6Address") SEQ, 0, 2, 2, DECODE | EXT, 669 + offsetof(UnicastAddress, iP6Address), _UnicastAddress_iP6Address}, 672 670 {FNAME("netBios") OCTSTR, FIXD, 16, 0, SKIP, 0, NULL}, 673 671 {FNAME("iPSourceRouteAddress") SEQ, 0, 4, 4, SKIP | EXT, 0, 674 672 _UnicastAddress_iPSourceRouteAddress}, ··· 986 984 {FNAME("featureSet") SEQ, 3, 4, 4, SKIP | EXT | OPT, 0, NULL}, 987 985 }; 988 986 989 - static field_t _Information_UUIE_fastStart[] = { /* SEQUENCE OF */ 990 - {FNAME("item") SEQ, 1, 3, 5, DECODE | OPEN | EXT, 991 - sizeof(OpenLogicalChannel), _OpenLogicalChannel} 992 - , 993 - }; 994 - 995 987 static field_t _Information_UUIE[] = { /* SEQUENCE */ 996 988 {FNAME("protocolIdentifier") OID, BYTE, 0, 0, SKIP, 0, NULL}, 997 989 {FNAME("callIdentifier") SEQ, 0, 1, 1, SKIP | EXT, 0, NULL}, 998 990 {FNAME("tokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, 999 991 {FNAME("cryptoTokens") SEQOF, SEMI, 0, 0, SKIP | OPT, 0, NULL}, 1000 - {FNAME("fastStart") SEQOF, SEMI, 0, 30, DECODE | OPT, 1001 - offsetof(Information_UUIE, fastStart), _Information_UUIE_fastStart}, 992 + {FNAME("fastStart") SEQOF, SEMI, 0, 30, SKIP | OPT, 0, NULL}, 1002 993 {FNAME("fastConnectRefused") NUL, FIXD, 0, 0, SKIP | OPT, 0, NULL}, 1003 994 {FNAME("circuitInfo") SEQ, 3, 3, 3, SKIP | EXT | OPT, 0, NULL}, 1004 995 }; ··· 1338 1343 offsetof(H323_UU_PDU_h323_message_body, connect), _Connect_UUIE}, 1339 1344 {FNAME("alerting") SEQ, 1, 3, 17, DECODE | EXT, 1340 1345 offsetof(H323_UU_PDU_h323_message_body, alerting), _Alerting_UUIE}, 1341 - {FNAME("information") SEQ, 0, 1, 7, DECODE | EXT, 1342 - offsetof(H323_UU_PDU_h323_message_body, information), 1343 - _Information_UUIE}, 1346 + {FNAME("information") SEQ, 0, 1, 7, SKIP | EXT, 0, _Information_UUIE}, 1344 1347 {FNAME("releaseComplete") SEQ, 1, 2, 11, SKIP | EXT, 0, 1345 1348 _ReleaseComplete_UUIE}, 1346 1349 {FNAME("facility") SEQ, 3, 5, 21, DECODE | EXT, ··· 1423 1430 DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, 1424 1431 reverseLogicalChannelParameters), 1425 1432 _OpenLogicalChannelAck_reverseLogicalChannelParameters}, 1426 - {FNAME("separateStack") SEQ, 2, 4, 5, SKIP | EXT | OPT, 0, NULL}, 1433 + {FNAME("separateStack") SEQ, 2, 4, 5, DECODE | EXT | OPT, 1434 + offsetof(OpenLogicalChannelAck, separateStack), 1435 + _NetworkAccessParameters}, 1427 1436 {FNAME("forwardMultiplexAckParameters") CHOICE, 0, 1, 1, 1428 1437 DECODE | EXT | OPT, offsetof(OpenLogicalChannelAck, 1429 1438 forwardMultiplexAckParameters),
+1 -1
net/sched/sch_generic.c
··· 169 169 else 170 170 q->ops->requeue(skb, q); 171 171 netif_schedule(dev); 172 - return 0; 173 172 } 173 + return 0; 174 174 175 175 out: 176 176 BUG_ON((int) q->q.qlen < 0);
+3 -2
net/sched/sch_htb.c
··· 976 976 977 977 if (q->now >= q->near_ev_cache[level]) { 978 978 event = htb_do_events(q, level); 979 - q->near_ev_cache[level] = event ? event : 980 - PSCHED_TICKS_PER_SEC; 979 + if (!event) 980 + event = q->now + PSCHED_TICKS_PER_SEC; 981 + q->near_ev_cache[level] = event; 981 982 } else 982 983 event = q->near_ev_cache[level]; 983 984
+6 -8
net/sctp/Kconfig
··· 2 2 # SCTP configuration 3 3 # 4 4 5 - menu "SCTP Configuration (EXPERIMENTAL)" 6 - depends on INET && EXPERIMENTAL 7 - 8 - config IP_SCTP 5 + menuconfig IP_SCTP 9 6 tristate "The SCTP Protocol (EXPERIMENTAL)" 7 + depends on INET && EXPERIMENTAL 10 8 depends on IPV6 || IPV6=n 11 9 select CRYPTO if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5 12 10 select CRYPTO_HMAC if SCTP_HMAC_SHA1 || SCTP_HMAC_MD5 ··· 34 36 35 37 If in doubt, say N. 36 38 39 + if IP_SCTP 40 + 37 41 config SCTP_DBG_MSG 38 42 bool "SCTP: Debug messages" 39 - depends on IP_SCTP 40 43 help 41 44 If you say Y, this will enable verbose debugging messages. 42 45 ··· 46 47 47 48 config SCTP_DBG_OBJCNT 48 49 bool "SCTP: Debug object counts" 49 - depends on IP_SCTP 50 50 help 51 51 If you say Y, this will enable debugging support for counting the 52 52 type of objects that are currently allocated. This is useful for ··· 57 59 58 60 choice 59 61 prompt "SCTP: Cookie HMAC Algorithm" 60 - depends on IP_SCTP 61 62 default SCTP_HMAC_MD5 62 63 help 63 64 HMAC algorithm to be used during association initialization. It ··· 83 86 advised to use either HMAC-MD5 or HMAC-SHA1. 84 87 85 88 endchoice 86 - endmenu 89 + 90 + endif # IP_SCTP
+11 -13
net/tipc/Kconfig
··· 2 2 # TIPC configuration 3 3 # 4 4 5 - menu "TIPC Configuration (EXPERIMENTAL)" 6 - depends on INET && EXPERIMENTAL 7 - 8 - config TIPC 5 + menuconfig TIPC 9 6 tristate "The TIPC Protocol (EXPERIMENTAL)" 7 + depends on INET && EXPERIMENTAL 10 8 ---help--- 11 9 The Transparent Inter Process Communication (TIPC) protocol is 12 10 specially designed for intra cluster communication. This protocol ··· 20 22 21 23 If in doubt, say N. 22 24 25 + if TIPC 26 + 23 27 config TIPC_ADVANCED 24 28 bool "TIPC: Advanced configuration" 25 - depends on TIPC 26 29 default n 27 30 help 28 31 Saying Y here will open some advanced configuration ··· 32 33 33 34 config TIPC_ZONES 34 35 int "Maximum number of zones in network" 35 - depends on TIPC && TIPC_ADVANCED 36 + depends on TIPC_ADVANCED 36 37 default "3" 37 38 help 38 39 Max number of zones inside TIPC network. Max supported value ··· 43 44 44 45 config TIPC_CLUSTERS 45 46 int "Maximum number of clusters in a zone" 46 - depends on TIPC && TIPC_ADVANCED 47 + depends on TIPC_ADVANCED 47 48 default "1" 48 49 help 49 50 ***Only 1 (one cluster in a zone) is supported by current code. ··· 58 59 59 60 config TIPC_NODES 60 61 int "Maximum number of nodes in cluster" 61 - depends on TIPC && TIPC_ADVANCED 62 + depends on TIPC_ADVANCED 62 63 default "255" 63 64 help 64 65 Maximum number of nodes inside a TIPC cluster. Maximum ··· 69 70 70 71 config TIPC_SLAVE_NODES 71 72 int "Maximum number of slave nodes in cluster" 72 - depends on TIPC && TIPC_ADVANCED 73 + depends on TIPC_ADVANCED 73 74 default "0" 74 75 help 75 76 ***This capability is not supported by current code.*** ··· 82 83 83 84 config TIPC_PORTS 84 85 int "Maximum number of ports in a node" 85 - depends on TIPC && TIPC_ADVANCED 86 + depends on TIPC_ADVANCED 86 87 default "8191" 87 88 help 88 89 Maximum number of ports within a node. Maximum ··· 93 94 94 95 config TIPC_LOG 95 96 int "Size of log buffer" 96 - depends on TIPC && TIPC_ADVANCED 97 + depends on TIPC_ADVANCED 97 98 default 0 98 99 help 99 100 Size (in bytes) of TIPC's internal log buffer, which records the ··· 105 106 106 107 config TIPC_DEBUG 107 108 bool "Enable debugging support" 108 - depends on TIPC 109 109 default n 110 110 help 111 111 This will enable debugging of TIPC. ··· 112 114 Only say Y here if you are having trouble with TIPC. It will 113 115 enable the display of detailed information about what is going on. 114 116 115 - endmenu 117 + endif # TIPC
+6 -4
net/tipc/eth_media.c
··· 120 120 121 121 static int enable_bearer(struct tipc_bearer *tb_ptr) 122 122 { 123 - struct net_device *dev, *pdev; 123 + struct net_device *dev = NULL; 124 + struct net_device *pdev = NULL; 124 125 struct eth_bearer *eb_ptr = &eth_bearers[0]; 125 126 struct eth_bearer *stop = &eth_bearers[MAX_ETH_BEARERS]; 126 127 char *driver_name = strchr((const char *)tb_ptr->name, ':') + 1; 127 128 128 129 /* Find device with specified name */ 129 - dev = NULL; 130 - for_each_netdev(pdev) 131 - if (!strncmp(dev->name, driver_name, IFNAMSIZ)) { 130 + 131 + for_each_netdev(pdev){ 132 + if (!strncmp(pdev->name, driver_name, IFNAMSIZ)) { 132 133 dev = pdev; 133 134 break; 134 135 } 136 + } 135 137 if (!dev) 136 138 return -ENODEV; 137 139
+26 -2
net/xfrm/xfrm_policy.c
··· 29 29 30 30 #include "xfrm_hash.h" 31 31 32 + int sysctl_xfrm_larval_drop; 33 + 32 34 DEFINE_MUTEX(xfrm_cfg_mutex); 33 35 EXPORT_SYMBOL(xfrm_cfg_mutex); 34 36 ··· 1392 1390 * At the moment we eat a raw IP route. Mostly to speed up lookups 1393 1391 * on interfaces with disabled IPsec. 1394 1392 */ 1395 - int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 1396 - struct sock *sk, int flags) 1393 + int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 1394 + struct sock *sk, int flags) 1397 1395 { 1398 1396 struct xfrm_policy *policy; 1399 1397 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; ··· 1511 1509 1512 1510 if (unlikely(nx<0)) { 1513 1511 err = nx; 1512 + if (err == -EAGAIN && sysctl_xfrm_larval_drop) { 1513 + /* EREMOTE tells the caller to generate 1514 + * a one-shot blackhole route. 1515 + */ 1516 + xfrm_pol_put(policy); 1517 + return -EREMOTE; 1518 + } 1514 1519 if (err == -EAGAIN && flags) { 1515 1520 DECLARE_WAITQUEUE(wait, current); 1516 1521 ··· 1605 1596 dst_release(dst_orig); 1606 1597 xfrm_pols_put(pols, npols); 1607 1598 *dst_p = NULL; 1599 + return err; 1600 + } 1601 + EXPORT_SYMBOL(__xfrm_lookup); 1602 + 1603 + int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, 1604 + struct sock *sk, int flags) 1605 + { 1606 + int err = __xfrm_lookup(dst_p, fl, sk, flags); 1607 + 1608 + if (err == -EREMOTE) { 1609 + dst_release(*dst_p); 1610 + *dst_p = NULL; 1611 + err = -EAGAIN; 1612 + } 1613 + 1608 1614 return err; 1609 1615 } 1610 1616 EXPORT_SYMBOL(xfrm_lookup);