aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/atm/mpc.c13
-rw-r--r--net/atm/mpoa_caches.c12
-rw-r--r--net/netfilter/xt_sctp.c2
-rw-r--r--net/sched/sch_generic.c11
-rw-r--r--net/sctp/sm_make_chunk.c4
5 files changed, 19 insertions, 23 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index c304ef1513b9..a48a5d580408 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -229,20 +229,15 @@ int atm_mpoa_delete_qos(struct atm_mpoa_qos *entry)
229/* this is buggered - we need locking for qos_head */ 229/* this is buggered - we need locking for qos_head */
230void atm_mpoa_disp_qos(struct seq_file *m) 230void atm_mpoa_disp_qos(struct seq_file *m)
231{ 231{
232 unsigned char *ip;
233 char ipaddr[16];
234 struct atm_mpoa_qos *qos; 232 struct atm_mpoa_qos *qos;
235 233
236 qos = qos_head; 234 qos = qos_head;
237 seq_printf(m, "QoS entries for shortcuts:\n"); 235 seq_printf(m, "QoS entries for shortcuts:\n");
238 seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); 236 seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n");
239 237
240 ipaddr[sizeof(ipaddr)-1] = '\0';
241 while (qos != NULL) { 238 while (qos != NULL) {
242 ip = (unsigned char *)&qos->ipaddr;
243 sprintf(ipaddr, "%u.%u.%u.%u", NIPQUAD(ip));
244 seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", 239 seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n",
245 NIPQUAD(ipaddr), 240 NIPQUAD(qos->ipaddr),
246 qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, 241 qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu,
247 qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); 242 qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu);
248 qos = qos->next; 243 qos = qos->next;
@@ -1083,7 +1078,6 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1083static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry) 1078static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry)
1084{ 1079{
1085 uint32_t dst_ip = msg->content.in_info.in_dst_ip; 1080 uint32_t dst_ip = msg->content.in_info.in_dst_ip;
1086 unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip;
1087 struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip); 1081 struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip);
1088 eg_cache_entry *eg_entry = client->eg_ops->get_by_src_ip(dst_ip, client); 1082 eg_cache_entry *eg_entry = client->eg_ops->get_by_src_ip(dst_ip, client);
1089 1083
@@ -1097,7 +1091,7 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien
1097 entry->shortcut = eg_entry->shortcut; 1091 entry->shortcut = eg_entry->shortcut;
1098 } 1092 }
1099 if(entry->shortcut){ 1093 if(entry->shortcut){
1100 dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(ip)); 1094 dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip));
1101 client->eg_ops->put(eg_entry); 1095 client->eg_ops->put(eg_entry);
1102 return; 1096 return;
1103 } 1097 }
@@ -1123,8 +1117,7 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1123 1117
1124 uint32_t dst_ip = msg->content.in_info.in_dst_ip; 1118 uint32_t dst_ip = msg->content.in_info.in_dst_ip;
1125 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); 1119 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
1126 ip = (unsigned char *)&dst_ip; 1120 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(dst_ip));
1127 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(ip));
1128 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); 1121 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry);
1129 if(entry == NULL){ 1122 if(entry == NULL){
1130 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); 1123 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name);
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
index 64ddebb64060..781ed1b9329d 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
@@ -223,7 +223,6 @@ static void in_cache_remove_entry(in_cache_entry *entry,
223 but an easy one... */ 223 but an easy one... */
224static void clear_count_and_expired(struct mpoa_client *client) 224static void clear_count_and_expired(struct mpoa_client *client)
225{ 225{
226 unsigned char *ip;
227 in_cache_entry *entry, *next_entry; 226 in_cache_entry *entry, *next_entry;
228 struct timeval now; 227 struct timeval now;
229 228
@@ -236,8 +235,7 @@ static void clear_count_and_expired(struct mpoa_client *client)
236 next_entry = entry->next; 235 next_entry = entry->next;
237 if((now.tv_sec - entry->tv.tv_sec) 236 if((now.tv_sec - entry->tv.tv_sec)
238 > entry->ctrl_info.holding_time){ 237 > entry->ctrl_info.holding_time){
239 ip = (unsigned char*)&entry->ctrl_info.in_dst_ip; 238 dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(entry->ctrl_info.in_dst_ip));
240 dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(ip));
241 client->in_ops->remove_entry(entry, client); 239 client->in_ops->remove_entry(entry, client);
242 } 240 }
243 entry = next_entry; 241 entry = next_entry;
@@ -455,7 +453,6 @@ static void eg_cache_remove_entry(eg_cache_entry *entry,
455 453
456static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client) 454static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_client *client)
457{ 455{
458 unsigned char *ip;
459 eg_cache_entry *entry = kmalloc(sizeof(eg_cache_entry), GFP_KERNEL); 456 eg_cache_entry *entry = kmalloc(sizeof(eg_cache_entry), GFP_KERNEL);
460 457
461 if (entry == NULL) { 458 if (entry == NULL) {
@@ -463,8 +460,7 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli
463 return NULL; 460 return NULL;
464 } 461 }
465 462
466 ip = (unsigned char *)&msg->content.eg_info.eg_dst_ip; 463 dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(msg->content.eg_info.eg_dst_ip));
467 dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(ip));
468 memset(entry, 0, sizeof(eg_cache_entry)); 464 memset(entry, 0, sizeof(eg_cache_entry));
469 465
470 atomic_set(&entry->use, 1); 466 atomic_set(&entry->use, 1);
@@ -481,8 +477,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli
481 do_gettimeofday(&(entry->tv)); 477 do_gettimeofday(&(entry->tv));
482 entry->entry_state = EGRESS_RESOLVED; 478 entry->entry_state = EGRESS_RESOLVED;
483 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id)); 479 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id));
484 ip = (unsigned char *)&entry->ctrl_info.mps_ip; 480 dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n",
485 dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", NIPQUAD(ip)); 481 NIPQUAD(entry->ctrl_info.mps_ip));
486 atomic_inc(&entry->use); 482 atomic_inc(&entry->use);
487 483
488 write_unlock_irq(&client->egress_lock); 484 write_unlock_irq(&client->egress_lock);
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c
index b5110e5b54b0..9316c753692f 100644
--- a/net/netfilter/xt_sctp.c
+++ b/net/netfilter/xt_sctp.c
@@ -62,7 +62,7 @@ match_packet(const struct sk_buff *skb,
62 62
63 do { 63 do {
64 sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch); 64 sch = skb_header_pointer(skb, offset, sizeof(_sch), &_sch);
65 if (sch == NULL) { 65 if (sch == NULL || sch->length == 0) {
66 duprintf("Dropping invalid SCTP packet.\n"); 66 duprintf("Dropping invalid SCTP packet.\n");
67 *hotdrop = 1; 67 *hotdrop = 1;
68 return 0; 68 return 0;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index b1e4c5e20ac7..d7aca8ef524a 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -90,7 +90,7 @@ void qdisc_unlock_tree(struct net_device *dev)
90 NOTE: Called under dev->queue_lock with locally disabled BH. 90 NOTE: Called under dev->queue_lock with locally disabled BH.
91*/ 91*/
92 92
93int qdisc_restart(struct net_device *dev) 93static inline int qdisc_restart(struct net_device *dev)
94{ 94{
95 struct Qdisc *q = dev->qdisc; 95 struct Qdisc *q = dev->qdisc;
96 struct sk_buff *skb; 96 struct sk_buff *skb;
@@ -179,6 +179,14 @@ requeue:
179 return q->q.qlen; 179 return q->q.qlen;
180} 180}
181 181
182void __qdisc_run(struct net_device *dev)
183{
184 while (qdisc_restart(dev) < 0 && !netif_queue_stopped(dev))
185 /* NOTHING */;
186
187 clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
188}
189
182static void dev_watchdog(unsigned long arg) 190static void dev_watchdog(unsigned long arg)
183{ 191{
184 struct net_device *dev = (struct net_device *)arg; 192 struct net_device *dev = (struct net_device *)arg;
@@ -620,6 +628,5 @@ EXPORT_SYMBOL(qdisc_create_dflt);
620EXPORT_SYMBOL(qdisc_alloc); 628EXPORT_SYMBOL(qdisc_alloc);
621EXPORT_SYMBOL(qdisc_destroy); 629EXPORT_SYMBOL(qdisc_destroy);
622EXPORT_SYMBOL(qdisc_reset); 630EXPORT_SYMBOL(qdisc_reset);
623EXPORT_SYMBOL(qdisc_restart);
624EXPORT_SYMBOL(qdisc_lock_tree); 631EXPORT_SYMBOL(qdisc_lock_tree);
625EXPORT_SYMBOL(qdisc_unlock_tree); 632EXPORT_SYMBOL(qdisc_unlock_tree);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 5e0de3c0eead..2a8773691695 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1402,14 +1402,14 @@ struct sctp_association *sctp_unpack_cookie(
1402 sg.length = bodysize; 1402 sg.length = bodysize;
1403 key = (char *)ep->secret_key[ep->current_key]; 1403 key = (char *)ep->secret_key[ep->current_key];
1404 1404
1405 memset(digest, 0x00, sizeof(digest)); 1405 memset(digest, 0x00, SCTP_SIGNATURE_SIZE);
1406 sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg, 1406 sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, &sg,
1407 1, digest); 1407 1, digest);
1408 1408
1409 if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) { 1409 if (memcmp(digest, cookie->signature, SCTP_SIGNATURE_SIZE)) {
1410 /* Try the previous key. */ 1410 /* Try the previous key. */
1411 key = (char *)ep->secret_key[ep->last_key]; 1411 key = (char *)ep->secret_key[ep->last_key];
1412 memset(digest, 0x00, sizeof(digest)); 1412 memset(digest, 0x00, SCTP_SIGNATURE_SIZE);
1413 sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen, 1413 sctp_crypto_hmac(sctp_sk(ep->base.sk)->hmac, key, &keylen,
1414 &sg, 1, digest); 1414 &sg, 1, digest);
1415 1415