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: (28 commits)
[NET_SCHED] sch_htb: htb_requeue fix
[IPV6]: Replace using the magic constant "1024" with IP6_RT_PRIO_USER for fc_metric.
starfire: secton fix
via-velocity: section fix
natsemi: section fix
typhoon: section fix
isdn: fix section mismatch warning for ISACVer
isdn: fix section mismatch warnings from hisax_cs_setup_card
isdn: fix section mismatch warnings in isac.c and isar.c
isdn: fix section mismatch warning in hfc_sx.c
[PKT_SCHED] ematch: tcf_em_destroy robustness
[PKT_SCHED]: deinline functions in meta match
[SCTP]: Convert sctp_dbg_objcnt to seq files.
[SCTP]: Use snmp_fold_field instead of a homebrew analogue.
[IGMP]: Optimize kfree_skb in igmp_rcv.
[KEY]: Convert net/pfkey to use seq files.
[KEY]: Clean up proc files creation a bit.
pppol2tp: fix printk warnings
bnx2: section fix
bnx2x: section fix
...

+375 -327
+1 -2
drivers/isdn/hisax/avm_a1p.c
··· 213 return 0; 214 } 215 216 - int 217 - setup_avm_a1_pcmcia(struct IsdnCard *card) 218 { 219 u_char model, vers; 220 struct IsdnCardState *cs = card->cs;
··· 213 return 0; 214 } 215 216 + int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card) 217 { 218 u_char model, vers; 219 struct IsdnCardState *cs = card->cs;
+5 -2
drivers/isdn/hisax/config.c
··· 847 return 3; 848 } 849 850 - static int hisax_cs_setup_card(struct IsdnCard *card) 851 { 852 int ret; 853 ··· 1166 return 0; 1167 } 1168 1169 - static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner) 1170 { 1171 int ret; 1172 struct IsdnCard *card = cards + cardnr;
··· 847 return 3; 848 } 849 850 + static int __devinit hisax_cs_setup_card(struct IsdnCard *card) 851 { 852 int ret; 853 ··· 1166 return 0; 1167 } 1168 1169 + /* Used from an exported function but calls __devinit functions. 1170 + * Tell modpost not to warn (__ref) 1171 + */ 1172 + static int __ref checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner) 1173 { 1174 int ret; 1175 struct IsdnCard *card = cards + cardnr;
+1 -2
drivers/isdn/hisax/hfc_sx.c
··· 1330 /********************************/ 1331 /* called for card init message */ 1332 /********************************/ 1333 - static void __devinit 1334 - inithfcsx(struct IsdnCardState *cs) 1335 { 1336 cs->setstack_d = setstack_hfcsx; 1337 cs->BC_Send_Data = &hfcsx_send_data;
··· 1330 /********************************/ 1331 /* called for card init message */ 1332 /********************************/ 1333 + static void inithfcsx(struct IsdnCardState *cs) 1334 { 1335 cs->setstack_d = setstack_hfcsx; 1336 cs->BC_Send_Data = &hfcsx_send_data;
+3 -6
drivers/isdn/hisax/isac.c
··· 27 {"2086/2186 V1.1", "2085 B1", "2085 B2", 28 "2085 V2.3"}; 29 30 - void 31 - ISACVersion(struct IsdnCardState *cs, char *s) 32 { 33 int val; 34 ··· 615 } 616 } 617 618 - void __devinit 619 - initisac(struct IsdnCardState *cs) 620 { 621 cs->setstack_d = setstack_isac; 622 cs->DC_Close = DC_Close_isac; ··· 646 cs->writeisac(cs, ISAC_MASK, 0x0); 647 } 648 649 - void __devinit 650 - clear_pending_isac_ints(struct IsdnCardState *cs) 651 { 652 int val, eval; 653
··· 27 {"2086/2186 V1.1", "2085 B1", "2085 B2", 28 "2085 V2.3"}; 29 30 + void __devinit ISACVersion(struct IsdnCardState *cs, char *s) 31 { 32 int val; 33 ··· 616 } 617 } 618 619 + void initisac(struct IsdnCardState *cs) 620 { 621 cs->setstack_d = setstack_isac; 622 cs->DC_Close = DC_Close_isac; ··· 648 cs->writeisac(cs, ISAC_MASK, 0x0); 649 } 650 651 + void clear_pending_isac_ints(struct IsdnCardState *cs) 652 { 653 int val, eval; 654
+1 -2
drivers/isdn/hisax/isar.c
··· 1894 return(0); 1895 } 1896 1897 - void __devinit 1898 - initisar(struct IsdnCardState *cs) 1899 { 1900 cs->bcs[0].BC_SetStack = setstack_isar; 1901 cs->bcs[1].BC_SetStack = setstack_isar;
··· 1894 return(0); 1895 } 1896 1897 + void initisar(struct IsdnCardState *cs) 1898 { 1899 cs->bcs[0].BC_SetStack = setstack_isar; 1900 cs->bcs[1].BC_SetStack = setstack_isar;
+2 -2
drivers/net/bnx2.c
··· 64 /* Time in jiffies before concluding the transmitter is hung. */ 65 #define TX_TIMEOUT (5*HZ) 66 67 - static const char version[] __devinitdata = 68 "Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 69 70 MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>"); ··· 90 } board_t; 91 92 /* indexed by board_t, above */ 93 - static const struct { 94 char *name; 95 } board_info[] __devinitdata = { 96 { "Broadcom NetXtreme II BCM5706 1000Base-T" },
··· 64 /* Time in jiffies before concluding the transmitter is hung. */ 65 #define TX_TIMEOUT (5*HZ) 66 67 + static char version[] __devinitdata = 68 "Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 69 70 MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>"); ··· 90 } board_t; 91 92 /* indexed by board_t, above */ 93 + static struct { 94 char *name; 95 } board_info[] __devinitdata = { 96 { "Broadcom NetXtreme II BCM5706 1000Base-T" },
+2 -2
drivers/net/bnx2x.c
··· 70 /* Time in jiffies before concluding the transmitter is hung. */ 71 #define TX_TIMEOUT (5*HZ) 72 73 - static const char version[] __devinitdata = 74 "Broadcom NetXtreme II 577xx 10Gigabit Ethernet Driver " 75 DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 76 ··· 107 }; 108 109 /* indexed by board_t, above */ 110 - static const struct { 111 char *name; 112 } board_info[] __devinitdata = { 113 { "Broadcom NetXtreme II BCM57710 XGb" }
··· 70 /* Time in jiffies before concluding the transmitter is hung. */ 71 #define TX_TIMEOUT (5*HZ) 72 73 + static char version[] __devinitdata = 74 "Broadcom NetXtreme II 577xx 10Gigabit Ethernet Driver " 75 DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 76 ··· 107 }; 108 109 /* indexed by board_t, above */ 110 + static struct { 111 char *name; 112 } board_info[] __devinitdata = { 113 { "Broadcom NetXtreme II BCM57710 XGb" }
+3 -3
drivers/net/natsemi.c
··· 127 #define NATSEMI_RX_LIMIT 2046 /* maximum supported by hardware */ 128 129 /* These identify the driver base version and may not be removed. */ 130 - static const char version[] __devinitdata = 131 KERN_INFO DRV_NAME " dp8381x driver, version " 132 DRV_VERSION ", " DRV_RELDATE "\n" 133 KERN_INFO " originally by Donald Becker <becker@scyld.com>\n" ··· 238 }; 239 240 /* array of board data directly indexed by pci_tbl[x].driver_data */ 241 - static const struct { 242 const char *name; 243 unsigned long flags; 244 unsigned int eeprom_size; ··· 247 { "NatSemi DP8381[56]", 0, 24 }, 248 }; 249 250 - static const struct pci_device_id natsemi_pci_tbl[] __devinitdata = { 251 { PCI_VENDOR_ID_NS, 0x0020, 0x12d9, 0x000c, 0, 0, 0 }, 252 { PCI_VENDOR_ID_NS, 0x0020, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, 253 { } /* terminate list */
··· 127 #define NATSEMI_RX_LIMIT 2046 /* maximum supported by hardware */ 128 129 /* These identify the driver base version and may not be removed. */ 130 + static char version[] __devinitdata = 131 KERN_INFO DRV_NAME " dp8381x driver, version " 132 DRV_VERSION ", " DRV_RELDATE "\n" 133 KERN_INFO " originally by Donald Becker <becker@scyld.com>\n" ··· 238 }; 239 240 /* array of board data directly indexed by pci_tbl[x].driver_data */ 241 + static struct { 242 const char *name; 243 unsigned long flags; 244 unsigned int eeprom_size; ··· 247 { "NatSemi DP8381[56]", 0, 24 }, 248 }; 249 250 + static struct pci_device_id natsemi_pci_tbl[] __devinitdata = { 251 { PCI_VENDOR_ID_NS, 0x0020, 0x12d9, 0x000c, 0, 0, 0 }, 252 { PCI_VENDOR_ID_NS, 0x0020, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, 253 { } /* terminate list */
+12 -10
drivers/net/pppol2tp.c
··· 2289 atomic_read(&tunnel->ref_count) - 1); 2290 seq_printf(m, " %08x %llu/%llu/%llu %llu/%llu/%llu\n", 2291 tunnel->debug, 2292 - tunnel->stats.tx_packets, tunnel->stats.tx_bytes, 2293 - tunnel->stats.tx_errors, 2294 - tunnel->stats.rx_packets, tunnel->stats.rx_bytes, 2295 - tunnel->stats.rx_errors); 2296 } 2297 2298 static void pppol2tp_seq_session_show(struct seq_file *m, void *v) ··· 2322 jiffies_to_msecs(session->reorder_timeout)); 2323 seq_printf(m, " %hu/%hu %llu/%llu/%llu %llu/%llu/%llu\n", 2324 session->nr, session->ns, 2325 - session->stats.tx_packets, 2326 - session->stats.tx_bytes, 2327 - session->stats.tx_errors, 2328 - session->stats.rx_packets, 2329 - session->stats.rx_bytes, 2330 - session->stats.rx_errors); 2331 } 2332 2333 static int pppol2tp_seq_show(struct seq_file *m, void *v)
··· 2289 atomic_read(&tunnel->ref_count) - 1); 2290 seq_printf(m, " %08x %llu/%llu/%llu %llu/%llu/%llu\n", 2291 tunnel->debug, 2292 + (unsigned long long)tunnel->stats.tx_packets, 2293 + (unsigned long long)tunnel->stats.tx_bytes, 2294 + (unsigned long long)tunnel->stats.tx_errors, 2295 + (unsigned long long)tunnel->stats.rx_packets, 2296 + (unsigned long long)tunnel->stats.rx_bytes, 2297 + (unsigned long long)tunnel->stats.rx_errors); 2298 } 2299 2300 static void pppol2tp_seq_session_show(struct seq_file *m, void *v) ··· 2320 jiffies_to_msecs(session->reorder_timeout)); 2321 seq_printf(m, " %hu/%hu %llu/%llu/%llu %llu/%llu/%llu\n", 2322 session->nr, session->ns, 2323 + (unsigned long long)session->stats.tx_packets, 2324 + (unsigned long long)session->stats.tx_bytes, 2325 + (unsigned long long)session->stats.tx_errors, 2326 + (unsigned long long)session->stats.rx_packets, 2327 + (unsigned long long)session->stats.rx_bytes, 2328 + (unsigned long long)session->stats.rx_errors); 2329 } 2330 2331 static int pppol2tp_seq_show(struct seq_file *m, void *v)
+1 -1
drivers/net/starfire.c
··· 216 217 218 /* These identify the driver base version and may not be removed. */ 219 - static const char version[] __devinitdata = 220 KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <becker@scyld.com>\n" 221 KERN_INFO " (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n"; 222
··· 216 217 218 /* These identify the driver base version and may not be removed. */ 219 + static char version[] = 220 KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <becker@scyld.com>\n" 221 KERN_INFO " (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n"; 222
+2 -2
drivers/net/typhoon.c
··· 134 #include "typhoon.h" 135 #include "typhoon-firmware.h" 136 137 - static const char version[] __devinitdata = 138 "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 139 140 MODULE_AUTHOR("David Dillow <dave@thedillows.org>"); ··· 178 }; 179 180 /* directly indexed by enum typhoon_cards, above */ 181 - static const struct typhoon_card_info typhoon_card_info[] __devinitdata = { 182 { "3Com Typhoon (3C990-TX)", 183 TYPHOON_CRYPTO_NONE}, 184 { "3Com Typhoon (3CR990-TX-95)",
··· 134 #include "typhoon.h" 135 #include "typhoon-firmware.h" 136 137 + static char version[] __devinitdata = 138 "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 139 140 MODULE_AUTHOR("David Dillow <dave@thedillows.org>"); ··· 178 }; 179 180 /* directly indexed by enum typhoon_cards, above */ 181 + static struct typhoon_card_info typhoon_card_info[] __devinitdata = { 182 { "3Com Typhoon (3C990-TX)", 183 TYPHOON_CRYPTO_NONE}, 184 { "3Com Typhoon (3CR990-TX-95)",
+1 -1
drivers/net/via-velocity.c
··· 440 * Internal board variants. At the moment we have only one 441 */ 442 443 - static const struct velocity_info_tbl chip_info_table[] __devinitdata = { 444 {CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 1, 0x00FFFFFFUL}, 445 { } 446 };
··· 440 * Internal board variants. At the moment we have only one 441 */ 442 443 + static struct velocity_info_tbl chip_info_table[] = { 444 {CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 1, 0x00FFFFFFUL}, 445 { } 446 };
+2 -2
include/linux/sctp.h
··· 10 * 11 * Various protocol defined structures. 12 * 13 - * The SCTP reference implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 - * The SCTP reference implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 10 * 11 * Various protocol defined structures. 12 * 13 + * This SCTP implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 + * This SCTP implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/auth.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. 3 * 4 - * This file is part of the SCTP kernel reference Implementation 5 * 6 - * The SCTP reference implementation is free software; 7 * you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 - * The SCTP reference implementation is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 14 * ************************ 15 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. 3 * 4 + * This file is part of the SCTP kernel implementation 5 * 6 + * This SCTP implementation is free software; 7 * you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 + * This SCTP implementation is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 14 * ************************ 15 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/command.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (C) 1999-2001 Cisco, Motorola 4 * 5 - * This file is part of the SCTP kernel reference Implementation 6 * 7 * These are the definitions needed for the command object. 8 * 9 - * The SCTP reference implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 - * the SCTP reference implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (C) 1999-2001 Cisco, Motorola 4 * 5 + * This file is part of the SCTP kernel implementation 6 * 7 * These are the definitions needed for the command object. 8 * 9 + * This SCTP implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 + * This SCTP implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/constants.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 - * The SCTP reference implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 - * The SCTP reference implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 + * This SCTP implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 + * This SCTP implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/sctp.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2003 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * The base lksctp header. 10 * 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2003 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * The base lksctp header. 10 * 11 + * This SCTP implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 + * This SCTP implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/sm.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * These are definitions needed by the state machine. 10 * 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * These are definitions needed by the state machine. 10 * 11 + * This SCTP implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 + * This SCTP implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/structs.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 - * The SCTP reference implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 - * The SCTP reference implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 + * This SCTP implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 + * This SCTP implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/tsnmap.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * These are the definitions needed for the tsnmap type. The tsnmap is used 10 * to track out of order TSNs received. 11 * 12 - * The SCTP reference implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 - * The SCTP reference implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * These are the definitions needed for the tsnmap type. The tsnmap is used 10 * to track out of order TSNs received. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/ulpevent.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 10 * sctp_ulpevent type is used to carry information from the state machine 11 * upwards to the ULP. 12 * 13 - * This file is part of the SCTP kernel reference Implementation 14 * 15 - * The SCTP reference implementation is free software; 16 * you can redistribute it and/or modify it under the terms of 17 * the GNU General Public License as published by 18 * the Free Software Foundation; either version 2, or (at your option) 19 * any later version. 20 * 21 - * The SCTP reference implementation is distributed in the hope that it 22 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 23 * ************************ 24 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 10 * sctp_ulpevent type is used to carry information from the state machine 11 * upwards to the ULP. 12 * 13 + * This file is part of the SCTP kernel implementation 14 * 15 + * This SCTP implementation is free software; 16 * you can redistribute it and/or modify it under the terms of 17 * the GNU General Public License as published by 18 * the Free Software Foundation; either version 2, or (at your option) 19 * any later version. 20 * 21 + * This SCTP implementation is distributed in the hope that it 22 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 23 * ************************ 24 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+3 -3
include/net/sctp/ulpqueue.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 11 * and the core SCTP state machine. This is the component which handles 12 * reassembly and ordering. 13 * 14 - * The SCTP reference implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 - * the SCTP reference implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 11 * and the core SCTP state machine. This is the component which handles 12 * reassembly and ordering. 13 * 14 + * This SCTP implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 + * This SCTP implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
include/net/sctp/user.h
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2002 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * This header represents the structures and constants needed to support 10 * the SCTP Extension to the Sockets API. 11 * 12 - * The SCTP reference implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 - * The SCTP reference implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2002 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * This header represents the structures and constants needed to support 10 * the SCTP Extension to the Sockets API. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+6 -7
net/ipv4/igmp.c
··· 922 struct in_device *in_dev = in_dev_get(skb->dev); 923 int len = skb->len; 924 925 - if (in_dev==NULL) { 926 - kfree_skb(skb); 927 - return 0; 928 - } 929 930 if (!pskb_may_pull(skb, sizeof(struct igmphdr))) 931 - goto drop; 932 933 switch (skb->ip_summed) { 934 case CHECKSUM_COMPLETE: ··· 936 case CHECKSUM_NONE: 937 skb->csum = 0; 938 if (__skb_checksum_complete(skb)) 939 - goto drop; 940 } 941 942 ih = igmp_hdr(skb); ··· 970 break; 971 } 972 973 - drop: 974 in_dev_put(in_dev); 975 kfree_skb(skb); 976 return 0; 977 }
··· 922 struct in_device *in_dev = in_dev_get(skb->dev); 923 int len = skb->len; 924 925 + if (in_dev == NULL) 926 + goto drop; 927 928 if (!pskb_may_pull(skb, sizeof(struct igmphdr))) 929 + goto drop_ref; 930 931 switch (skb->ip_summed) { 932 case CHECKSUM_COMPLETE: ··· 938 case CHECKSUM_NONE: 939 skb->csum = 0; 940 if (__skb_checksum_complete(skb)) 941 + goto drop_ref; 942 } 943 944 ih = igmp_hdr(skb); ··· 972 break; 973 } 974 975 + drop_ref: 976 in_dev_put(in_dev); 977 + drop: 978 kfree_skb(skb); 979 return 0; 980 }
+2 -2
net/ipv6/route.c
··· 1620 { 1621 struct fib6_config cfg = { 1622 .fc_table = RT6_TABLE_INFO, 1623 - .fc_metric = 1024, 1624 .fc_ifindex = ifindex, 1625 .fc_dst_len = prefixlen, 1626 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | ··· 1670 { 1671 struct fib6_config cfg = { 1672 .fc_table = RT6_TABLE_DFLT, 1673 - .fc_metric = 1024, 1674 .fc_ifindex = dev->ifindex, 1675 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT | 1676 RTF_UP | RTF_EXPIRES | RTF_PREF(pref),
··· 1620 { 1621 struct fib6_config cfg = { 1622 .fc_table = RT6_TABLE_INFO, 1623 + .fc_metric = IP6_RT_PRIO_USER, 1624 .fc_ifindex = ifindex, 1625 .fc_dst_len = prefixlen, 1626 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | ··· 1670 { 1671 struct fib6_config cfg = { 1672 .fc_table = RT6_TABLE_DFLT, 1673 + .fc_metric = IP6_RT_PRIO_USER, 1674 .fc_ifindex = dev->ifindex, 1675 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT | 1676 RTF_UP | RTF_EXPIRES | RTF_PREF(pref),
+79 -38
net/key/af_key.c
··· 3734 }; 3735 3736 #ifdef CONFIG_PROC_FS 3737 - static int pfkey_read_proc(char *buffer, char **start, off_t offset, 3738 - int length, int *eof, void *data) 3739 { 3740 - off_t pos = 0; 3741 - off_t begin = 0; 3742 - int len = 0; 3743 struct sock *s; 3744 - struct hlist_node *node; 3745 3746 - len += sprintf(buffer,"sk RefCnt Rmem Wmem User Inode\n"); 3747 - 3748 - read_lock(&pfkey_table_lock); 3749 - 3750 - sk_for_each(s, node, &pfkey_table) { 3751 - len += sprintf(buffer+len,"%p %-6d %-6u %-6u %-6u %-6lu", 3752 s, 3753 atomic_read(&s->sk_refcnt), 3754 atomic_read(&s->sk_rmem_alloc), ··· 3750 sock_i_uid(s), 3751 sock_i_ino(s) 3752 ); 3753 3754 - buffer[len++] = '\n'; 3755 3756 - pos = begin + len; 3757 - if (pos < offset) { 3758 - len = 0; 3759 - begin = pos; 3760 - } 3761 - if(pos > offset + length) 3762 - goto done; 3763 - } 3764 - *eof = 1; 3765 3766 - done: 3767 read_unlock(&pfkey_table_lock); 3768 3769 - *start = buffer + (offset - begin); 3770 - len -= (offset - begin); 3771 3772 - if (len > length) 3773 - len = length; 3774 - if (len < 0) 3775 - len = 0; 3776 3777 - return len; 3778 } 3779 #endif 3780 ··· 3843 static void __exit ipsec_pfkey_exit(void) 3844 { 3845 xfrm_unregister_km(&pfkeyv2_mgr); 3846 - remove_proc_entry("pfkey", init_net.proc_net); 3847 sock_unregister(PF_KEY); 3848 proto_unregister(&key_proto); 3849 } ··· 3858 err = sock_register(&pfkey_family_ops); 3859 if (err != 0) 3860 goto out_unregister_key_proto; 3861 - #ifdef CONFIG_PROC_FS 3862 - err = -ENOMEM; 3863 - if (create_proc_read_entry("pfkey", 0, init_net.proc_net, pfkey_read_proc, NULL) == NULL) 3864 goto out_sock_unregister; 3865 - #endif 3866 err = xfrm_register_km(&pfkeyv2_mgr); 3867 if (err != 0) 3868 goto out_remove_proc_entry; 3869 out: 3870 return err; 3871 out_remove_proc_entry: 3872 - #ifdef CONFIG_PROC_FS 3873 - remove_proc_entry("net/pfkey", NULL); 3874 out_sock_unregister: 3875 - #endif 3876 sock_unregister(PF_KEY); 3877 out_unregister_key_proto: 3878 proto_unregister(&key_proto);
··· 3734 }; 3735 3736 #ifdef CONFIG_PROC_FS 3737 + static int pfkey_seq_show(struct seq_file *f, void *v) 3738 { 3739 struct sock *s; 3740 3741 + s = (struct sock *)v; 3742 + if (v == SEQ_START_TOKEN) 3743 + seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n"); 3744 + else 3745 + seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n", 3746 s, 3747 atomic_read(&s->sk_refcnt), 3748 atomic_read(&s->sk_rmem_alloc), ··· 3756 sock_i_uid(s), 3757 sock_i_ino(s) 3758 ); 3759 + return 0; 3760 + } 3761 3762 + static void *pfkey_seq_start(struct seq_file *f, loff_t *ppos) 3763 + { 3764 + struct sock *s; 3765 + struct hlist_node *node; 3766 + loff_t pos = *ppos; 3767 3768 + read_lock(&pfkey_table_lock); 3769 + if (pos == 0) 3770 + return SEQ_START_TOKEN; 3771 3772 + sk_for_each(s, node, &pfkey_table) 3773 + if (pos-- == 1) 3774 + return s; 3775 + 3776 + return NULL; 3777 + } 3778 + 3779 + static void *pfkey_seq_next(struct seq_file *f, void *v, loff_t *ppos) 3780 + { 3781 + ++*ppos; 3782 + return (v == SEQ_START_TOKEN) ? 3783 + sk_head(&pfkey_table) : 3784 + sk_next((struct sock *)v); 3785 + } 3786 + 3787 + static void pfkey_seq_stop(struct seq_file *f, void *v) 3788 + { 3789 read_unlock(&pfkey_table_lock); 3790 + } 3791 3792 + static struct seq_operations pfkey_seq_ops = { 3793 + .start = pfkey_seq_start, 3794 + .next = pfkey_seq_next, 3795 + .stop = pfkey_seq_stop, 3796 + .show = pfkey_seq_show, 3797 + }; 3798 3799 + static int pfkey_seq_open(struct inode *inode, struct file *file) 3800 + { 3801 + return seq_open(file, &pfkey_seq_ops); 3802 + } 3803 3804 + static struct file_operations pfkey_proc_ops = { 3805 + .open = pfkey_seq_open, 3806 + .read = seq_read, 3807 + .llseek = seq_lseek, 3808 + .release = seq_release, 3809 + }; 3810 + 3811 + static int pfkey_init_proc(void) 3812 + { 3813 + struct proc_dir_entry *e; 3814 + 3815 + e = create_proc_entry("pfkey", 0, init_net.proc_net); 3816 + if (e == NULL) 3817 + return -ENOMEM; 3818 + 3819 + e->proc_fops = &pfkey_proc_ops; 3820 + return 0; 3821 + } 3822 + 3823 + static void pfkey_exit_proc(void) 3824 + { 3825 + remove_proc_entry("net/pfkey", NULL); 3826 + } 3827 + #else 3828 + static inline int pfkey_init_proc(void) 3829 + { 3830 + return 0; 3831 + } 3832 + 3833 + static inline void pfkey_exit_proc(void) 3834 + { 3835 } 3836 #endif 3837 ··· 3798 static void __exit ipsec_pfkey_exit(void) 3799 { 3800 xfrm_unregister_km(&pfkeyv2_mgr); 3801 + pfkey_exit_proc(); 3802 sock_unregister(PF_KEY); 3803 proto_unregister(&key_proto); 3804 } ··· 3813 err = sock_register(&pfkey_family_ops); 3814 if (err != 0) 3815 goto out_unregister_key_proto; 3816 + err = pfkey_init_proc(); 3817 + if (err != 0) 3818 goto out_sock_unregister; 3819 err = xfrm_register_km(&pfkeyv2_mgr); 3820 if (err != 0) 3821 goto out_remove_proc_entry; 3822 out: 3823 return err; 3824 out_remove_proc_entry: 3825 + pfkey_exit_proc(); 3826 out_sock_unregister: 3827 sock_unregister(PF_KEY); 3828 out_unregister_key_proto: 3829 proto_unregister(&key_proto);
+3 -3
net/sched/em_meta.c
··· 687 * Core 688 **************************************************************************/ 689 690 - static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info, 691 - struct meta_value *v, struct meta_obj *dst) 692 { 693 int err = 0; 694 ··· 733 return 0; 734 } 735 736 - static inline void meta_delete(struct meta_match *meta) 737 { 738 if (meta) { 739 struct meta_type_ops *ops = meta_type_ops(&meta->lvalue);
··· 687 * Core 688 **************************************************************************/ 689 690 + static int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info, 691 + struct meta_value *v, struct meta_obj *dst) 692 { 693 int err = 0; 694 ··· 733 return 0; 734 } 735 736 + static void meta_delete(struct meta_match *meta) 737 { 738 if (meta) { 739 struct meta_type_ops *ops = meta_type_ops(&meta->lvalue);
+5 -5
net/sched/ematch.c
··· 312 struct tcf_ematch_tree_hdr *tree_hdr; 313 struct tcf_ematch *em; 314 315 - if (!nla) { 316 - memset(tree, 0, sizeof(*tree)); 317 return 0; 318 - } 319 320 err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy); 321 if (err < 0) ··· 409 if (em->ops) { 410 if (em->ops->destroy) 411 em->ops->destroy(tp, em); 412 - else if (!tcf_em_is_simple(em) && em->data) 413 - kfree((void *) em->data); 414 module_put(em->ops->owner); 415 } 416 } 417 418 tree->hdr.nmatches = 0; 419 kfree(tree->matches); 420 } 421 EXPORT_SYMBOL(tcf_em_tree_destroy); 422
··· 312 struct tcf_ematch_tree_hdr *tree_hdr; 313 struct tcf_ematch *em; 314 315 + memset(tree, 0, sizeof(*tree)); 316 + if (!nla) 317 return 0; 318 319 err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy); 320 if (err < 0) ··· 410 if (em->ops) { 411 if (em->ops->destroy) 412 em->ops->destroy(tp, em); 413 + else if (!tcf_em_is_simple(em)) 414 + kfree(em->data); 415 module_put(em->ops->owner); 416 } 417 } 418 419 tree->hdr.nmatches = 0; 420 kfree(tree->matches); 421 + tree->matches = NULL; 422 } 423 EXPORT_SYMBOL(tcf_em_tree_destroy); 424
+10 -3
net/sched/sch_htb.c
··· 609 /* TODO: requeuing packet charges it to policers again !! */ 610 static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) 611 { 612 struct htb_sched *q = qdisc_priv(sch); 613 - int ret = NET_XMIT_SUCCESS; 614 struct htb_class *cl = htb_classify(skb, sch, &ret); 615 struct sk_buff *tskb; 616 617 - if (cl == HTB_DIRECT || !cl) { 618 /* enqueue to helper queue */ 619 - if (q->direct_queue.qlen < q->direct_qlen && cl) { 620 __skb_queue_head(&q->direct_queue, skb); 621 } else { 622 __skb_queue_head(&q->direct_queue, skb); ··· 625 sch->qstats.drops++; 626 return NET_XMIT_CN; 627 } 628 } else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) != 629 NET_XMIT_SUCCESS) { 630 sch->qstats.drops++;
··· 609 /* TODO: requeuing packet charges it to policers again !! */ 610 static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) 611 { 612 + int ret; 613 struct htb_sched *q = qdisc_priv(sch); 614 struct htb_class *cl = htb_classify(skb, sch, &ret); 615 struct sk_buff *tskb; 616 617 + if (cl == HTB_DIRECT) { 618 /* enqueue to helper queue */ 619 + if (q->direct_queue.qlen < q->direct_qlen) { 620 __skb_queue_head(&q->direct_queue, skb); 621 } else { 622 __skb_queue_head(&q->direct_queue, skb); ··· 625 sch->qstats.drops++; 626 return NET_XMIT_CN; 627 } 628 + #ifdef CONFIG_NET_CLS_ACT 629 + } else if (!cl) { 630 + if (ret == NET_XMIT_BYPASS) 631 + sch->qstats.drops++; 632 + kfree_skb(skb); 633 + return ret; 634 + #endif 635 } else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) != 636 NET_XMIT_SUCCESS) { 637 sch->qstats.drops++;
+7 -7
net/sctp/associola.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * Copyright (c) 2001 La Monte H.P. Yarroll 7 * 8 - * This file is part of the SCTP kernel reference Implementation 9 * 10 * This module provides the abstraction for an SCTP association. 11 * 12 - * The SCTP reference implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 - * The SCTP reference implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 1525 const struct sctp_association *asoc, 1526 __be32 serial) 1527 { 1528 - struct sctp_chunk *ack = NULL; 1529 1530 /* Walk through the list of cached ASCONF-ACKs and find the 1531 * ack chunk whose serial number matches that of the request. ··· 1533 list_for_each_entry(ack, &asoc->asconf_ack_list, transmitted_list) { 1534 if (ack->subh.addip_hdr->serial == serial) { 1535 sctp_chunk_hold(ack); 1536 - break; 1537 } 1538 } 1539 1540 - return ack; 1541 }
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * Copyright (c) 2001 La Monte H.P. Yarroll 7 * 8 + * This file is part of the SCTP kernel implementation 9 * 10 * This module provides the abstraction for an SCTP association. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 1525 const struct sctp_association *asoc, 1526 __be32 serial) 1527 { 1528 + struct sctp_chunk *ack; 1529 1530 /* Walk through the list of cached ASCONF-ACKs and find the 1531 * ack chunk whose serial number matches that of the request. ··· 1533 list_for_each_entry(ack, &asoc->asconf_ack_list, transmitted_list) { 1534 if (ack->subh.addip_hdr->serial == serial) { 1535 sctp_chunk_hold(ack); 1536 + return ack; 1537 } 1538 } 1539 1540 + return NULL; 1541 }
+4 -4
net/sctp/auth.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. 3 * 4 - * This file is part of the SCTP kernel reference Implementation 5 * 6 - * The SCTP reference implementation is free software; 7 * you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 - * The SCTP reference implementation is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 14 * ************************ 15 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright 2007 Hewlett-Packard Development Company, L.P. 3 * 4 + * This file is part of the SCTP kernel implementation 5 * 6 + * This SCTP implementation is free software; 7 * you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 + * This SCTP implementation is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 14 * ************************ 15 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/bind_addr.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2003 3 * Copyright (c) Cisco 1999,2000 4 * Copyright (c) Motorola 1999,2000,2001 5 * Copyright (c) La Monte H.P. Yarroll 2001 6 * 7 - * This file is part of the SCTP kernel reference implementation. 8 * 9 * A collection class to handle the storage of transport addresses. 10 * 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2003 3 * Copyright (c) Cisco 1999,2000 4 * Copyright (c) Motorola 1999,2000,2001 5 * Copyright (c) La Monte H.P. Yarroll 2001 6 * 7 + * This file is part of the SCTP kernel implementation. 8 * 9 * A collection class to handle the storage of transport addresses. 10 * 11 + * This SCTP implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 + * This SCTP implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/chunk.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2003, 2004 3 * 4 - * This file is part of the SCTP kernel reference Implementation 5 * 6 * This file contains the code relating the chunk abstraction. 7 * 8 - * The SCTP reference implementation is free software; 9 * you can redistribute it and/or modify it under the terms of 10 * the GNU General Public License as published by 11 * the Free Software Foundation; either version 2, or (at your option) 12 * any later version. 13 * 14 - * The SCTP reference implementation is distributed in the hope that it 15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 16 * ************************ 17 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2003, 2004 3 * 4 + * This file is part of the SCTP kernel implementation 5 * 6 * This file contains the code relating the chunk abstraction. 7 * 8 + * This SCTP implementation is free software; 9 * you can redistribute it and/or modify it under the terms of 10 * the GNU General Public License as published by 11 * the Free Software Foundation; either version 2, or (at your option) 12 * any later version. 13 * 14 + * This SCTP implementation is distributed in the hope that it 15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 16 * ************************ 17 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/command.c
··· 1 - /* SCTP kernel reference Implementation Copyright (C) 1999-2001 2 * Cisco, Motorola, and IBM 3 * Copyright 2001 La Monte H.P. Yarroll 4 * 5 - * This file is part of the SCTP kernel reference Implementation 6 * 7 * These functions manipulate sctp command sequences. 8 * 9 - * The SCTP reference implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 - * The SCTP reference implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation Copyright (C) 1999-2001 2 * Cisco, Motorola, and IBM 3 * Copyright 2001 La Monte H.P. Yarroll 4 * 5 + * This file is part of the SCTP kernel implementation 6 * 7 * These functions manipulate sctp command sequences. 8 * 9 + * This SCTP implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 + * This SCTP implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -8
net/sctp/debug.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 - * 9 - * This file is part of the implementation of the add-IP extension, 10 - * based on <draft-ietf-tsvwg-addip-sctp-02.txt> June 29, 2001, 11 - * for the SCTP kernel reference Implementation. 12 * 13 * This file converts numerical ID value to alphabetical names for SCTP 14 * terms such as chunk type, parameter time, event type, etc. 15 * 16 - * The SCTP reference implementation is free software; 17 * you can redistribute it and/or modify it under the terms of 18 * the GNU General Public License as published by 19 * the Free Software Foundation; either version 2, or (at your option) 20 * any later version. 21 * 22 - * The SCTP reference implementation is distributed in the hope that it 23 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 24 * ************************ 25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * This file converts numerical ID value to alphabetical names for SCTP 10 * terms such as chunk type, parameter time, event type, etc. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -8
net/sctp/endpointola.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2001-2002 International Business Machines, Corp. ··· 6 * Copyright (c) 2001 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 - * This file is part of the SCTP kernel reference Implementation 10 * 11 * This abstraction represents an SCTP endpoint. 12 * 13 - * This file is part of the implementation of the add-IP extension, 14 - * based on <draft-ietf-tsvwg-addip-sctp-02.txt> June 29, 2001, 15 - * for the SCTP kernel reference Implementation. 16 - * 17 - * The SCTP reference implementation is free software; 18 * you can redistribute it and/or modify it under the terms of 19 * the GNU General Public License as published by 20 * the Free Software Foundation; either version 2, or (at your option) 21 * any later version. 22 * 23 - * The SCTP reference implementation is distributed in the hope that it 24 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 25 * ************************ 26 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2001-2002 International Business Machines, Corp. ··· 6 * Copyright (c) 2001 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 + * This file is part of the SCTP kernel implementation 10 * 11 * This abstraction represents an SCTP endpoint. 12 * 13 + * The SCTP implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 + * The SCTP implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/input.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2001-2003 International Business Machines, Corp. ··· 6 * Copyright (c) 2001 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 - * This file is part of the SCTP kernel reference Implementation 10 * 11 * These functions handle all input from the IP layer into SCTP. 12 * 13 - * The SCTP reference implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 - * The SCTP reference implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2001-2003 International Business Machines, Corp. ··· 6 * Copyright (c) 2001 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 + * This file is part of the SCTP kernel implementation 10 * 11 * These functions handle all input from the IP layer into SCTP. 12 * 13 + * This SCTP implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 + * This SCTP implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/inqueue.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2002 International Business Machines, Corp. 5 * 6 - * This file is part of the SCTP kernel reference Implementation 7 * 8 * These functions are the methods for accessing the SCTP inqueue. 9 * ··· 11 * (which might be bundles or fragments of chunks) and out of which you 12 * pop SCTP whole chunks. 13 * 14 - * The SCTP reference implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 - * The SCTP reference implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2002 International Business Machines, Corp. 5 * 6 + * This file is part of the SCTP kernel implementation 7 * 8 * These functions are the methods for accessing the SCTP inqueue. 9 * ··· 11 * (which might be bundles or fragments of chunks) and out of which you 12 * pop SCTP whole chunks. 13 * 14 + * This SCTP implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 + * This SCTP implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/ipv6.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2002, 2004 3 * Copyright (c) 2001 Nokia, Inc. 4 * Copyright (c) 2001 La Monte H.P. Yarroll 5 * Copyright (c) 2002-2003 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * SCTP over IPv6. 10 * 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2002, 2004 3 * Copyright (c) 2001 Nokia, Inc. 4 * Copyright (c) 2001 La Monte H.P. Yarroll 5 * Copyright (c) 2002-2003 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * SCTP over IPv6. 10 * 11 + * This SCTP implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 + * This SCTP implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+48 -45
net/sctp/objcnt.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * 4 - * This file is part of the SCTP kernel reference Implementation 5 * 6 * Support for memory object debugging. This allows one to monitor the 7 * object allocations/deallocations for types instrumented for this 8 * via the proc fs. 9 * 10 - * The SCTP reference implementation is free software; 11 * you can redistribute it and/or modify it under the terms of 12 * the GNU General Public License as published by 13 * the Free Software Foundation; either version 2, or (at your option) 14 * any later version. 15 * 16 - * The SCTP reference implementation is distributed in the hope that it 17 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 * ************************ 19 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 80 /* Callback from procfs to read out objcount information. 81 * Walk through the entries in the sctp_dbg_objcnt array, dumping 82 * the raw object counts for each monitored type. 83 - * 84 - * This code was modified from similar code in route.c 85 */ 86 - static int sctp_dbg_objcnt_read(char *buffer, char **start, off_t offset, 87 - int length, int *eof, void *data) 88 { 89 - int len = 0; 90 - off_t pos = 0; 91 - int entries; 92 int i; 93 char temp[128]; 94 95 - /* How many entries? */ 96 - entries = ARRAY_SIZE(sctp_dbg_objcnt); 97 - 98 - /* Walk the entries and print out the debug information 99 - * for proc fs. 100 - */ 101 - for (i = 0; i < entries; i++) { 102 - pos += 128; 103 - 104 - /* Skip ahead. */ 105 - if (pos <= offset) { 106 - len = 0; 107 - continue; 108 - } 109 - /* Print out each entry. */ 110 - sprintf(temp, "%s: %d", 111 - sctp_dbg_objcnt[i].label, 112 - atomic_read(sctp_dbg_objcnt[i].counter)); 113 - 114 - sprintf(buffer + len, "%-127s\n", temp); 115 - len += 128; 116 - if (pos >= offset+length) 117 - goto done; 118 - } 119 - 120 - done: 121 - *start = buffer + len - (pos - offset); 122 - len = pos - offset; 123 - if (len > length) 124 - len = length; 125 - 126 - return len; 127 } 128 129 /* Initialize the objcount in the proc filesystem. */ 130 void sctp_dbg_objcnt_init(void) 131 { 132 struct proc_dir_entry *ent; 133 - ent = create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp, 134 - sctp_dbg_objcnt_read, NULL); 135 if (!ent) 136 printk(KERN_WARNING 137 "sctp_dbg_objcnt: Unable to create /proc entry.\n"); 138 } 139 140 /* Cleanup the objcount entry in the proc filesystem. */
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * 4 + * This file is part of the SCTP kernel implementation 5 * 6 * Support for memory object debugging. This allows one to monitor the 7 * object allocations/deallocations for types instrumented for this 8 * via the proc fs. 9 * 10 + * This SCTP implementation is free software; 11 * you can redistribute it and/or modify it under the terms of 12 * the GNU General Public License as published by 13 * the Free Software Foundation; either version 2, or (at your option) 14 * any later version. 15 * 16 + * This SCTP implementation is distributed in the hope that it 17 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 * ************************ 19 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 80 /* Callback from procfs to read out objcount information. 81 * Walk through the entries in the sctp_dbg_objcnt array, dumping 82 * the raw object counts for each monitored type. 83 */ 84 + static int sctp_objcnt_seq_show(struct seq_file *seq, void *v) 85 { 86 int i; 87 char temp[128]; 88 89 + i = (int)*(loff_t *)v; 90 + sprintf(temp, "%s: %d", sctp_dbg_objcnt[i].label, 91 + atomic_read(sctp_dbg_objcnt[i].counter)); 92 + seq_printf(seq, "%-127s\n", temp); 93 + return 0; 94 } 95 + 96 + static void *sctp_objcnt_seq_start(struct seq_file *seq, loff_t *pos) 97 + { 98 + return (*pos >= ARRAY_SIZE(sctp_dbg_objcnt)) ? NULL : (void *)pos; 99 + } 100 + 101 + static void sctp_objcnt_seq_stop(struct seq_file *seq, void *v) 102 + { 103 + } 104 + 105 + static void * sctp_objcnt_seq_next(struct seq_file *seq, void *v, loff_t *pos) 106 + { 107 + ++*pos; 108 + return (*pos >= ARRAY_SIZE(sctp_dbg_objcnt)) ? NULL : (void *)pos; 109 + } 110 + 111 + static const struct seq_operations sctp_objcnt_seq_ops = { 112 + .start = sctp_objcnt_seq_start, 113 + .next = sctp_objcnt_seq_next, 114 + .stop = sctp_objcnt_seq_stop, 115 + .show = sctp_objcnt_seq_show, 116 + }; 117 + 118 + static int sctp_objcnt_seq_open(struct inode *inode, struct file *file) 119 + { 120 + return seq_open(file, &sctp_objcnt_seq_ops); 121 + } 122 + 123 + static const struct file_operations sctp_objcnt_ops = { 124 + .open = sctp_objcnt_seq_open, 125 + .read = seq_read, 126 + .llseek = seq_lseek, 127 + .release = seq_release, 128 + }; 129 130 /* Initialize the objcount in the proc filesystem. */ 131 void sctp_dbg_objcnt_init(void) 132 { 133 struct proc_dir_entry *ent; 134 + 135 + ent = create_proc_entry("sctp_dbg_objcnt", 0, proc_net_sctp); 136 if (!ent) 137 printk(KERN_WARNING 138 "sctp_dbg_objcnt: Unable to create /proc entry.\n"); 139 + else 140 + ent->proc_fops = &sctp_objcnt_ops; 141 } 142 143 /* Cleanup the objcount entry in the proc filesystem. */
+4 -4
net/sctp/output.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * 6 - * This file is part of the SCTP kernel reference Implementation 7 * 8 * These functions handle output processing. 9 * 10 - * The SCTP reference implementation is free software; 11 * you can redistribute it and/or modify it under the terms of 12 * the GNU General Public License as published by 13 * the Free Software Foundation; either version 2, or (at your option) 14 * any later version. 15 * 16 - * The SCTP reference implementation is distributed in the hope that it 17 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 * ************************ 19 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * 6 + * This file is part of the SCTP kernel implementation 7 * 8 * These functions handle output processing. 9 * 10 + * This SCTP implementation is free software; 11 * you can redistribute it and/or modify it under the terms of 12 * the GNU General Public License as published by 13 * the Free Software Foundation; either version 2, or (at your option) 14 * any later version. 15 * 16 + * This SCTP implementation is distributed in the hope that it 17 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 18 * ************************ 19 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+7 -5
net/sctp/outqueue.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2003 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * These functions implement the sctp_outq class. The outqueue handles 10 * bundling and queueing of outgoing SCTP chunks. 11 * 12 - * The SCTP reference implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 - * The SCTP reference implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 1179 tchunk = list_entry(lchunk, struct sctp_chunk, 1180 transmitted_list); 1181 tsn = ntohl(tchunk->subh.data_hdr->tsn); 1182 - if (TSN_lte(tsn, ctsn)) 1183 sctp_chunk_free(tchunk); 1184 } 1185 1186 /* ii) Set rwnd equal to the newly received a_rwnd minus the
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2003 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * These functions implement the sctp_outq class. The outqueue handles 10 * bundling and queueing of outgoing SCTP chunks. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 1179 tchunk = list_entry(lchunk, struct sctp_chunk, 1180 transmitted_list); 1181 tsn = ntohl(tchunk->subh.data_hdr->tsn); 1182 + if (TSN_lte(tsn, ctsn)) { 1183 + list_del_init(&tchunk->transmitted_list); 1184 sctp_chunk_free(tchunk); 1185 + } 1186 } 1187 1188 /* ii) Set rwnd equal to the newly received a_rwnd minus the
+4 -4
net/sctp/primitive.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * 5 - * This file is part of the SCTP kernel reference Implementation 6 * 7 * These functions implement the SCTP primitive functions from Section 10. 8 * ··· 10 * functions--this file is the functions which populate the struct proto 11 * for SCTP which is the BOTTOM of the sockets interface. 12 * 13 - * The SCTP reference implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 - * The SCTP reference implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * 5 + * This file is part of the SCTP kernel implementation 6 * 7 * These functions implement the SCTP primitive functions from Section 10. 8 * ··· 10 * functions--this file is the functions which populate the struct proto 11 * for SCTP which is the BOTTOM of the sockets interface. 12 * 13 + * This SCTP implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 + * This SCTP implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+6 -25
net/sctp/proc.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 2003 International Business Machines, Corp. 3 * 4 - * This file is part of the SCTP kernel reference Implementation 5 * 6 - * The SCTP reference implementation is free software; 7 * you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 - * The SCTP reference implementation is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 14 * ************************ 15 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 38 #include <linux/seq_file.h> 39 #include <linux/init.h> 40 #include <net/sctp/sctp.h> 41 42 static struct snmp_mib sctp_snmp_list[] = { 43 SNMP_MIB_ITEM("SctpCurrEstab", SCTP_MIB_CURRESTAB), ··· 76 SNMP_MIB_SENTINEL 77 }; 78 79 - /* Return the current value of a particular entry in the mib by adding its 80 - * per cpu counters. 81 - */ 82 - static unsigned long 83 - fold_field(void *mib[], int nr) 84 - { 85 - unsigned long res = 0; 86 - int i; 87 - 88 - for_each_possible_cpu(i) { 89 - res += 90 - *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) + 91 - sizeof (unsigned long) * nr)); 92 - res += 93 - *((unsigned long *) (((void *) per_cpu_ptr(mib[1], i)) + 94 - sizeof (unsigned long) * nr)); 95 - } 96 - return res; 97 - } 98 - 99 /* Display sctp snmp mib statistics(/proc/net/sctp/snmp). */ 100 static int sctp_snmp_seq_show(struct seq_file *seq, void *v) 101 { ··· 83 84 for (i = 0; sctp_snmp_list[i].name != NULL; i++) 85 seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i].name, 86 - fold_field((void **)sctp_statistics, 87 sctp_snmp_list[i].entry)); 88 89 return 0;
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 2003 International Business Machines, Corp. 3 * 4 + * This file is part of the SCTP kernel implementation 5 * 6 + * This SCTP implementation is free software; 7 * you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 + * This SCTP implementation is distributed in the hope that it 13 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 14 * ************************ 15 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 38 #include <linux/seq_file.h> 39 #include <linux/init.h> 40 #include <net/sctp/sctp.h> 41 + #include <net/ip.h> /* for snmp_fold_field */ 42 43 static struct snmp_mib sctp_snmp_list[] = { 44 SNMP_MIB_ITEM("SctpCurrEstab", SCTP_MIB_CURRESTAB), ··· 75 SNMP_MIB_SENTINEL 76 }; 77 78 /* Display sctp snmp mib statistics(/proc/net/sctp/snmp). */ 79 static int sctp_snmp_seq_show(struct seq_file *seq, void *v) 80 { ··· 102 103 for (i = 0; sctp_snmp_list[i].name != NULL; i++) 104 seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i].name, 105 + snmp_fold_field((void **)sctp_statistics, 106 sctp_snmp_list[i].entry)); 107 108 return 0;
+4 -4
net/sctp/protocol.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 6 * Copyright (c) 2001 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 - * This file is part of the SCTP kernel reference Implementation 10 * 11 * Initialization/cleanup for SCTP protocol support. 12 * 13 - * The SCTP reference implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 - * The SCTP reference implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 6 * Copyright (c) 2001 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 + * This file is part of the SCTP kernel implementation 10 * 11 * Initialization/cleanup for SCTP protocol support. 12 * 13 + * This SCTP implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 + * This SCTP implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+5 -4
net/sctp/sm_make_chunk.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2002 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * These functions work with the state functions in sctp_sm_statefuns.c 10 * to implement the state operations. These functions implement the 11 * steps which require modifying existing data structures. 12 * 13 - * The SCTP reference implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 - * The SCTP reference implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 3224 } 3225 3226 /* Free the cached last sent asconf chunk. */ 3227 sctp_chunk_free(asconf); 3228 asoc->addip_last_asconf = NULL; 3229
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2002 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * These functions work with the state functions in sctp_sm_statefuns.c 10 * to implement the state operations. These functions implement the 11 * steps which require modifying existing data structures. 12 * 13 + * This SCTP implementation is free software; 14 * you can redistribute it and/or modify it under the terms of 15 * the GNU General Public License as published by 16 * the Free Software Foundation; either version 2, or (at your option) 17 * any later version. 18 * 19 + * This SCTP implementation is distributed in the hope that it 20 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 21 * ************************ 22 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 3224 } 3225 3226 /* Free the cached last sent asconf chunk. */ 3227 + list_del_init(&asconf->transmitted_list); 3228 sctp_chunk_free(asconf); 3229 asoc->addip_last_asconf = NULL; 3230
+4 -4
net/sctp/sm_sideeffect.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * 6 - * This file is part of the SCTP kernel reference Implementation 7 * 8 * These functions work with the state functions in sctp_sm_statefuns.c 9 * to implement that state operations. These functions implement the 10 * steps which require modifying existing data structures. 11 * 12 - * The SCTP reference implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 - * The SCTP reference implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * 6 + * This file is part of the SCTP kernel implementation 7 * 8 * These functions work with the state functions in sctp_sm_statefuns.c 9 * to implement that state operations. These functions implement the 10 * steps which require modifying existing data structures. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -6
net/sctp/sm_statefuns.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2002 Intel Corp. 6 * Copyright (c) 2002 Nokia Corp. 7 * 8 - * This file is part of the SCTP kernel reference Implementation 9 - * 10 - * This is part of the SCTP Linux Kernel Reference Implementation. 11 * 12 * These are the state functions for the state machine. 13 * 14 - * The SCTP reference implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 - * The SCTP reference implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2002 Intel Corp. 6 * Copyright (c) 2002 Nokia Corp. 7 * 8 + * This is part of the SCTP Linux Kernel Implementation. 9 * 10 * These are the state functions for the state machine. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/sm_statetable.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * Copyright (c) 2001 Nokia, Inc. 7 * 8 - * This file is part of the SCTP kernel reference Implementation 9 * 10 * These are the state tables for the SCTP state machine. 11 * 12 - * The SCTP reference implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 - * The SCTP reference implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * Copyright (c) 2001 Nokia, Inc. 7 * 8 + * This file is part of the SCTP kernel implementation 9 * 10 * These are the state tables for the SCTP state machine. 11 * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+12 -5
net/sctp/socket.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 6 * Copyright (c) 2001-2002 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 - * This file is part of the SCTP kernel reference Implementation 10 * 11 * These functions interface with the sockets layer to implement the 12 * SCTP Extensions for the Sockets API. ··· 15 * functions--this file is the functions which populate the struct proto 16 * for SCTP which is the BOTTOM of the sockets interface. 17 * 18 - * The SCTP reference implementation is free software; 19 * you can redistribute it and/or modify it under the terms of 20 * the GNU General Public License as published by 21 * the Free Software Foundation; either version 2, or (at your option) 22 * any later version. 23 * 24 - * The SCTP reference implementation is distributed in the hope that it 25 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 26 * ************************ 27 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 1911 * rwnd by that amount. If all the data in the skb is read, 1912 * rwnd is updated when the event is freed. 1913 */ 1914 - sctp_assoc_rwnd_increase(event->asoc, copied); 1915 goto out; 1916 } else if ((event->msg_flags & MSG_NOTIFICATION) || 1917 (event->msg_flags & MSG_EOR)) ··· 4315 (AF_INET6 == addr->a.sa.sa_family)) 4316 continue; 4317 memcpy(&temp, &addr->a, sizeof(temp)); 4318 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), 4319 &temp); 4320 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; ··· 4350 (AF_INET6 == addr->a.sa.sa_family)) 4351 continue; 4352 memcpy(&temp, &addr->a, sizeof(temp)); 4353 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), 4354 &temp); 4355 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 6 * Copyright (c) 2001-2002 Nokia, Inc. 7 * Copyright (c) 2001 La Monte H.P. Yarroll 8 * 9 + * This file is part of the SCTP kernel implementation 10 * 11 * These functions interface with the sockets layer to implement the 12 * SCTP Extensions for the Sockets API. ··· 15 * functions--this file is the functions which populate the struct proto 16 * for SCTP which is the BOTTOM of the sockets interface. 17 * 18 + * This SCTP implementation is free software; 19 * you can redistribute it and/or modify it under the terms of 20 * the GNU General Public License as published by 21 * the Free Software Foundation; either version 2, or (at your option) 22 * any later version. 23 * 24 + * This SCTP implementation is distributed in the hope that it 25 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 26 * ************************ 27 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 1911 * rwnd by that amount. If all the data in the skb is read, 1912 * rwnd is updated when the event is freed. 1913 */ 1914 + if (!sctp_ulpevent_is_notification(event)) 1915 + sctp_assoc_rwnd_increase(event->asoc, copied); 1916 goto out; 1917 } else if ((event->msg_flags & MSG_NOTIFICATION) || 1918 (event->msg_flags & MSG_EOR)) ··· 4314 (AF_INET6 == addr->a.sa.sa_family)) 4315 continue; 4316 memcpy(&temp, &addr->a, sizeof(temp)); 4317 + if (!temp.v4.sin_port) 4318 + temp.v4.sin_port = htons(port); 4319 + 4320 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), 4321 &temp); 4322 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; ··· 4346 (AF_INET6 == addr->a.sa.sa_family)) 4347 continue; 4348 memcpy(&temp, &addr->a, sizeof(temp)); 4349 + if (!temp.v4.sin_port) 4350 + temp.v4.sin_port = htons(port); 4351 + 4352 sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), 4353 &temp); 4354 addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len;
+4 -4
net/sctp/ssnmap.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 2003 International Business Machines, Corp. 3 * 4 - * This file is part of the SCTP kernel reference Implementation 5 * 6 * These functions manipulate sctp SSN tracker. 7 * 8 - * The SCTP reference implementation is free software; 9 * you can redistribute it and/or modify it under the terms of 10 * the GNU General Public License as published by 11 * the Free Software Foundation; either version 2, or (at your option) 12 * any later version. 13 * 14 - * The SCTP reference implementation is distributed in the hope that it 15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 16 * ************************ 17 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 2003 International Business Machines, Corp. 3 * 4 + * This file is part of the SCTP kernel implementation 5 * 6 * These functions manipulate sctp SSN tracker. 7 * 8 + * This SCTP implementation is free software; 9 * you can redistribute it and/or modify it under the terms of 10 * the GNU General Public License as published by 11 * the Free Software Foundation; either version 2, or (at your option) 12 * any later version. 13 * 14 + * This SCTP implementation is distributed in the hope that it 15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 16 * ************************ 17 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/sysctl.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2002, 2004 3 * Copyright (c) 2002 Intel Corp. 4 * 5 - * This file is part of the SCTP kernel reference Implementation 6 * 7 * Sysctl related interfaces for SCTP. 8 * 9 - * The SCTP reference implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 - * The SCTP reference implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2002, 2004 3 * Copyright (c) 2002 Intel Corp. 4 * 5 + * This file is part of the SCTP kernel implementation 6 * 7 * Sysctl related interfaces for SCTP. 8 * 9 + * This SCTP implementation is free software; 10 * you can redistribute it and/or modify it under the terms of 11 * the GNU General Public License as published by 12 * the Free Software Foundation; either version 2, or (at your option) 13 * any later version. 14 * 15 + * This SCTP implementation is distributed in the hope that it 16 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 17 * ************************ 18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/transport.c
··· 1 - /* SCTP kernel reference Implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2001-2003 International Business Machines Corp. 5 * Copyright (c) 2001 Intel Corp. 6 * Copyright (c) 2001 La Monte H.P. Yarroll 7 * 8 - * This file is part of the SCTP kernel reference Implementation 9 * 10 * This module provides the abstraction for an SCTP tranport representing 11 * a remote transport address. For local transport addresses, we just use 12 * union sctp_addr. 13 * 14 - * The SCTP reference implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 - * The SCTP reference implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * Copyright (c) 1999-2000 Cisco, Inc. 3 * Copyright (c) 1999-2001 Motorola, Inc. 4 * Copyright (c) 2001-2003 International Business Machines Corp. 5 * Copyright (c) 2001 Intel Corp. 6 * Copyright (c) 2001 La Monte H.P. Yarroll 7 * 8 + * This file is part of the SCTP kernel implementation 9 * 10 * This module provides the abstraction for an SCTP tranport representing 11 * a remote transport address. For local transport addresses, we just use 12 * union sctp_addr. 13 * 14 + * This SCTP implementation is free software; 15 * you can redistribute it and/or modify it under the terms of 16 * the GNU General Public License as published by 17 * the Free Software Foundation; either version 2, or (at your option) 18 * any later version. 19 * 20 + * This SCTP implementation is distributed in the hope that it 21 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 22 * ************************ 23 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -4
net/sctp/tsnmap.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 - * This file is part of the SCTP kernel reference Implementation 8 * 9 * These functions manipulate sctp tsn mapping array. 10 * 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001 Intel Corp. 6 * 7 + * This file is part of the SCTP kernel implementation 8 * 9 * These functions manipulate sctp tsn mapping array. 10 * 11 + * This SCTP implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 + * This SCTP implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+4 -3
net/sctp/ulpevent.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 8 * 9 * These functions manipulate an sctp event. The struct ulpevent is used 10 * to carry notifications and data to the ULP (sockets). 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 8 * 9 * These functions manipulate an sctp event. The struct ulpevent is used 10 * to carry notifications and data to the ULP (sockets). 11 + * 12 + * This SCTP implementation is free software; 13 * you can redistribute it and/or modify it under the terms of 14 * the GNU General Public License as published by 15 * the Free Software Foundation; either version 2, or (at your option) 16 * any later version. 17 * 18 + * This SCTP implementation is distributed in the hope that it 19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 20 * ************************ 21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+30 -13
net/sctp/ulpqueue.c
··· 1 - /* SCTP kernel reference Implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 8 * 9 * This abstraction carries sctp events to the ULP (sockets). 10 * 11 - * The SCTP reference implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 - * The SCTP reference implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 283 /* 2nd Level Abstractions */ 284 285 /* Helper function to store chunks that need to be reassembled. */ 286 - static inline void sctp_ulpq_store_reasm(struct sctp_ulpq *ulpq, 287 struct sctp_ulpevent *event) 288 { 289 struct sk_buff *pos; ··· 405 /* Helper function to check if an incoming chunk has filled up the last 406 * missing fragment in a SCTP datagram and return the corresponding event. 407 */ 408 - static inline struct sctp_ulpevent *sctp_ulpq_retrieve_reassembled(struct sctp_ulpq *ulpq) 409 { 410 struct sk_buff *pos; 411 struct sctp_ulpevent *cevent; ··· 512 } 513 514 /* Retrieve the next set of fragments of a partial message. */ 515 - static inline struct sctp_ulpevent *sctp_ulpq_retrieve_partial(struct sctp_ulpq *ulpq) 516 { 517 struct sk_buff *pos, *last_frag, *first_frag; 518 struct sctp_ulpevent *cevent; ··· 606 } 607 608 /* Retrieve the first part (sequential fragments) for partial delivery. */ 609 - static inline struct sctp_ulpevent *sctp_ulpq_retrieve_first(struct sctp_ulpq *ulpq) 610 { 611 struct sk_buff *pos, *last_frag, *first_frag; 612 struct sctp_ulpevent *cevent; ··· 735 /* Helper function to gather skbs that have possibly become 736 * ordered by an an incoming chunk. 737 */ 738 - static inline void sctp_ulpq_retrieve_ordered(struct sctp_ulpq *ulpq, 739 struct sctp_ulpevent *event) 740 { 741 struct sk_buff_head *event_list; ··· 779 } 780 781 /* Helper function to store chunks needing ordering. */ 782 - static inline void sctp_ulpq_store_ordered(struct sctp_ulpq *ulpq, 783 struct sctp_ulpevent *event) 784 { 785 struct sk_buff *pos; ··· 867 /* Helper function to gather skbs that have possibly become 868 * ordered by forward tsn skipping their dependencies. 869 */ 870 - static inline void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq, __u16 sid) 871 { 872 struct sk_buff *pos, *tmp; 873 struct sctp_ulpevent *cevent; 874 struct sctp_ulpevent *event; 875 struct sctp_stream *in; 876 struct sk_buff_head temp; 877 __u16 csid, cssn; 878 879 in = &ulpq->asoc->ssnmap->in; ··· 882 /* We are holding the chunks by stream, by SSN. */ 883 skb_queue_head_init(&temp); 884 event = NULL; 885 - sctp_skb_for_each(pos, &ulpq->lobby, tmp) { 886 cevent = (struct sctp_ulpevent *) pos->cb; 887 csid = cevent->stream; 888 cssn = cevent->ssn; ··· 896 continue; 897 898 /* see if this ssn has been marked by skipping */ 899 - if (!SSN_lte(cssn, sctp_ssn_peek(in, csid))) 900 break; 901 902 - __skb_unlink(pos, &ulpq->lobby); 903 if (!event) 904 /* Create a temporary list to collect chunks on. */ 905 event = sctp_skb2event(pos); 906 907 /* Attach all gathered skbs to the event. */ 908 __skb_queue_tail(&temp, pos); 909 } 910 911 /* Send event to the ULP. 'event' is the sctp_ulpevent for
··· 1 + /* SCTP kernel implementation 2 * (C) Copyright IBM Corp. 2001, 2004 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. ··· 8 * 9 * This abstraction carries sctp events to the ULP (sockets). 10 * 11 + * This SCTP implementation is free software; 12 * you can redistribute it and/or modify it under the terms of 13 * the GNU General Public License as published by 14 * the Free Software Foundation; either version 2, or (at your option) 15 * any later version. 16 * 17 + * This SCTP implementation is distributed in the hope that it 18 * will be useful, but WITHOUT ANY WARRANTY; without even the implied 19 * ************************ 20 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ··· 283 /* 2nd Level Abstractions */ 284 285 /* Helper function to store chunks that need to be reassembled. */ 286 + static void sctp_ulpq_store_reasm(struct sctp_ulpq *ulpq, 287 struct sctp_ulpevent *event) 288 { 289 struct sk_buff *pos; ··· 405 /* Helper function to check if an incoming chunk has filled up the last 406 * missing fragment in a SCTP datagram and return the corresponding event. 407 */ 408 + static struct sctp_ulpevent *sctp_ulpq_retrieve_reassembled(struct sctp_ulpq *ulpq) 409 { 410 struct sk_buff *pos; 411 struct sctp_ulpevent *cevent; ··· 512 } 513 514 /* Retrieve the next set of fragments of a partial message. */ 515 + static struct sctp_ulpevent *sctp_ulpq_retrieve_partial(struct sctp_ulpq *ulpq) 516 { 517 struct sk_buff *pos, *last_frag, *first_frag; 518 struct sctp_ulpevent *cevent; ··· 606 } 607 608 /* Retrieve the first part (sequential fragments) for partial delivery. */ 609 + static struct sctp_ulpevent *sctp_ulpq_retrieve_first(struct sctp_ulpq *ulpq) 610 { 611 struct sk_buff *pos, *last_frag, *first_frag; 612 struct sctp_ulpevent *cevent; ··· 735 /* Helper function to gather skbs that have possibly become 736 * ordered by an an incoming chunk. 737 */ 738 + static void sctp_ulpq_retrieve_ordered(struct sctp_ulpq *ulpq, 739 struct sctp_ulpevent *event) 740 { 741 struct sk_buff_head *event_list; ··· 779 } 780 781 /* Helper function to store chunks needing ordering. */ 782 + static void sctp_ulpq_store_ordered(struct sctp_ulpq *ulpq, 783 struct sctp_ulpevent *event) 784 { 785 struct sk_buff *pos; ··· 867 /* Helper function to gather skbs that have possibly become 868 * ordered by forward tsn skipping their dependencies. 869 */ 870 + static void sctp_ulpq_reap_ordered(struct sctp_ulpq *ulpq, __u16 sid) 871 { 872 struct sk_buff *pos, *tmp; 873 struct sctp_ulpevent *cevent; 874 struct sctp_ulpevent *event; 875 struct sctp_stream *in; 876 struct sk_buff_head temp; 877 + struct sk_buff_head *lobby = &ulpq->lobby; 878 __u16 csid, cssn; 879 880 in = &ulpq->asoc->ssnmap->in; ··· 881 /* We are holding the chunks by stream, by SSN. */ 882 skb_queue_head_init(&temp); 883 event = NULL; 884 + sctp_skb_for_each(pos, lobby, tmp) { 885 cevent = (struct sctp_ulpevent *) pos->cb; 886 csid = cevent->stream; 887 cssn = cevent->ssn; ··· 895 continue; 896 897 /* see if this ssn has been marked by skipping */ 898 + if (!SSN_lt(cssn, sctp_ssn_peek(in, csid))) 899 break; 900 901 + __skb_unlink(pos, lobby); 902 if (!event) 903 /* Create a temporary list to collect chunks on. */ 904 event = sctp_skb2event(pos); 905 906 /* Attach all gathered skbs to the event. */ 907 __skb_queue_tail(&temp, pos); 908 + } 909 + 910 + /* If we didn't reap any data, see if the next expected SSN 911 + * is next on the queue and if so, use that. 912 + */ 913 + if (event == NULL && pos != (struct sk_buff *)lobby) { 914 + cevent = (struct sctp_ulpevent *) pos->cb; 915 + csid = cevent->stream; 916 + cssn = cevent->ssn; 917 + 918 + if (csid == sid && cssn == sctp_ssn_peek(in, csid)) { 919 + sctp_ssn_next(in, csid); 920 + __skb_unlink(pos, lobby); 921 + __skb_queue_tail(&temp, pos); 922 + event = sctp_skb2event(pos); 923 + } 924 } 925 926 /* Send event to the ULP. 'event' is the sctp_ulpevent for