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