* PATCH: (as189) Fix incorrect Appletalk DDP multicast address
@ 2004-02-12 21:24 Alan Stern
2004-02-14 20:54 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Alan Stern @ 2004-02-12 21:24 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Kernel development list
Arnaldo:
This error has been present in the Appletalk network stack for as long
as I can remember; it's a little surprising that nobody has fixed it yet.
The patch is for 2.6.x; a very similar change should work for 2.4.x. It
creates a single variable to hold the Appletalk ethernet multicast address
instead of having 4 separate copies statically allocated, one of which
(the one in ddp.c:atif_ioctl()) contains a typo.
Alan Stern
===== net/appletalk/aarp.c 1.9 vs edited =====
--- 1.9/net/appletalk/aarp.c Fri Sep 12 07:49:01 2003
+++ edited/net/appletalk/aarp.c Thu Feb 12 10:54:49 2004
@@ -39,6 +39,9 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+unsigned char atalk_eth_multicast[ETH_ALEN] =
+ { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
+
int sysctl_aarp_expiry_time = AARP_EXPIRY_TIME;
int sysctl_aarp_tick_time = AARP_TICK_TIME;
int sysctl_aarp_retransmit_limit = AARP_RETRANSMIT_LIMIT;
@@ -100,8 +103,6 @@
*/
static void __aarp_send_query(struct aarp_entry *a)
{
- static unsigned char aarp_eth_multicast[ETH_ALEN] =
- { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
struct net_device *dev = a->dev;
struct elapaarp *eah;
int len = dev->hard_header_len + sizeof(*eah) + aarp_dl->header_length;
@@ -143,7 +144,7 @@
eah->pa_dst_node = a->target_addr.s_node;
/* Send it */
- aarp_dl->request(aarp_dl, skb, aarp_eth_multicast);
+ aarp_dl->request(aarp_dl, skb, atalk_eth_multicast);
/* Update the sending count */
a->xmit_count++;
a->last_sent = jiffies;
@@ -204,8 +205,6 @@
struct elapaarp *eah;
int len = dev->hard_header_len + sizeof(*eah) + aarp_dl->header_length;
struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
- static unsigned char aarp_eth_multicast[ETH_ALEN] =
- { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
if (!skb)
return;
@@ -237,7 +236,7 @@
eah->pa_dst_node = us->s_node;
/* Send it */
- aarp_dl->request(aarp_dl, skb, aarp_eth_multicast);
+ aarp_dl->request(aarp_dl, skb, atalk_eth_multicast);
}
/*
@@ -536,8 +535,6 @@
int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb,
struct atalk_addr *sa, void *hwaddr)
{
- static char ddp_eth_multicast[ETH_ALEN] =
- { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
int hash;
struct aarp_entry *a;
@@ -599,7 +596,7 @@
/* Do we have a resolved entry? */
if (sa->s_node == ATADDR_BCAST) {
/* Send it */
- ddp_dl->request(ddp_dl, skb, ddp_eth_multicast);
+ ddp_dl->request(ddp_dl, skb, atalk_eth_multicast);
goto sent;
}
===== net/appletalk/ddp.c 1.21 vs edited =====
--- 1.21/net/appletalk/ddp.c Fri Feb 6 07:40:37 2004
+++ edited/net/appletalk/ddp.c Thu Feb 12 10:55:41 2004
@@ -71,6 +71,8 @@
extern void atalk_register_sysctl(void);
extern void atalk_unregister_sysctl(void);
+extern unsigned char atalk_eth_multicast[ETH_ALEN];
+
struct datalink_proto *ddp_dl, *aarp_dl;
static struct proto_ops atalk_dgram_ops;
@@ -675,7 +677,6 @@
/* Device configuration ioctl calls */
static int atif_ioctl(int cmd, void *arg)
{
- static char aarp_mcast[6] = { 0x09, 0x00, 0x00, 0xFF, 0xFF, 0xFF };
struct ifreq atreq;
struct atalk_netrange *nr;
struct sockaddr_at *sa;
@@ -794,7 +795,7 @@
atrtr_create(&rtdef, dev);
}
}
- dev_mc_add(dev, aarp_mcast, 6, 1);
+ dev_mc_add(dev, atalk_eth_multicast, 6, 1);
return 0;
case SIOCGIFADDR:
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: PATCH: (as189) Fix incorrect Appletalk DDP multicast address
2004-02-12 21:24 PATCH: (as189) Fix incorrect Appletalk DDP multicast address Alan Stern
@ 2004-02-14 20:54 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2004-02-14 20:54 UTC (permalink / raw)
To: Alan Stern; +Cc: Kernel development list
Em Thu, Feb 12, 2004 at 04:24:48PM -0500, Alan Stern escreveu:
> Arnaldo:
>
> This error has been present in the Appletalk network stack for as long
> as I can remember; it's a little surprising that nobody has fixed it yet.
Its my fault, somebody sent me this fix already, but I didn't applied it
at the time, then forgot, I'll do this as soon as I get back to kernel work,
now I'm way busy with real life(tm) :-\
Thanks for the patch!
- Arnaldo
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <200402131102.30325.ioe-lkml@rameria.de>]
* Re: PATCH: (as189) Fix incorrect Appletalk DDP multicast address
[not found] <200402131102.30325.ioe-lkml@rameria.de>
@ 2004-02-13 16:35 ` Alan Stern
0 siblings, 0 replies; 6+ messages in thread
From: Alan Stern @ 2004-02-13 16:35 UTC (permalink / raw)
To: Ingo Oeser, Arnaldo Carvalho de Melo; +Cc: Kernel development list
On Fri, 13 Feb 2004, Ingo Oeser wrote:
> Hi Alan,
> While you are at it: can't it be const? Then nobody would try to write
> to it and the compiler can optimize it away, if it is beneficial.
That's perfectly correct. Here's a revised patch.
Alan Stern
===== net/appletalk/aarp.c 1.9 vs edited =====
--- 1.9/net/appletalk/aarp.c Fri Sep 12 07:49:01 2003
+++ edited/net/appletalk/aarp.c Thu Feb 12 10:54:49 2004
@@ -39,6 +39,9 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+unsigned char const atalk_eth_multicast[ETH_ALEN] =
+ { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
+
int sysctl_aarp_expiry_time = AARP_EXPIRY_TIME;
int sysctl_aarp_tick_time = AARP_TICK_TIME;
int sysctl_aarp_retransmit_limit = AARP_RETRANSMIT_LIMIT;
@@ -100,8 +103,6 @@
*/
static void __aarp_send_query(struct aarp_entry *a)
{
- static unsigned char aarp_eth_multicast[ETH_ALEN] =
- { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
struct net_device *dev = a->dev;
struct elapaarp *eah;
int len = dev->hard_header_len + sizeof(*eah) + aarp_dl->header_length;
@@ -143,7 +144,7 @@
eah->pa_dst_node = a->target_addr.s_node;
/* Send it */
- aarp_dl->request(aarp_dl, skb, aarp_eth_multicast);
+ aarp_dl->request(aarp_dl, skb, atalk_eth_multicast);
/* Update the sending count */
a->xmit_count++;
a->last_sent = jiffies;
@@ -204,8 +205,6 @@
struct elapaarp *eah;
int len = dev->hard_header_len + sizeof(*eah) + aarp_dl->header_length;
struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
- static unsigned char aarp_eth_multicast[ETH_ALEN] =
- { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
if (!skb)
return;
@@ -237,7 +236,7 @@
eah->pa_dst_node = us->s_node;
/* Send it */
- aarp_dl->request(aarp_dl, skb, aarp_eth_multicast);
+ aarp_dl->request(aarp_dl, skb, atalk_eth_multicast);
}
/*
@@ -536,8 +535,6 @@
int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb,
struct atalk_addr *sa, void *hwaddr)
{
- static char ddp_eth_multicast[ETH_ALEN] =
- { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
int hash;
struct aarp_entry *a;
@@ -599,7 +596,7 @@
/* Do we have a resolved entry? */
if (sa->s_node == ATADDR_BCAST) {
/* Send it */
- ddp_dl->request(ddp_dl, skb, ddp_eth_multicast);
+ ddp_dl->request(ddp_dl, skb, atalk_eth_multicast);
goto sent;
}
===== net/appletalk/ddp.c 1.21 vs edited =====
--- 1.21/net/appletalk/ddp.c Fri Feb 6 07:40:37 2004
+++ edited/net/appletalk/ddp.c Thu Feb 12 10:55:41 2004
@@ -71,6 +71,8 @@
extern void atalk_register_sysctl(void);
extern void atalk_unregister_sysctl(void);
+extern unsigned char atalk_eth_multicast[ETH_ALEN];
+
struct datalink_proto *ddp_dl, *aarp_dl;
static struct proto_ops atalk_dgram_ops;
@@ -675,7 +677,6 @@
/* Device configuration ioctl calls */
static int atif_ioctl(int cmd, void *arg)
{
- static char aarp_mcast[6] = { 0x09, 0x00, 0x00, 0xFF, 0xFF, 0xFF };
struct ifreq atreq;
struct atalk_netrange *nr;
struct sockaddr_at *sa;
@@ -794,7 +795,7 @@
atrtr_create(&rtdef, dev);
}
}
- dev_mc_add(dev, aarp_mcast, 6, 1);
+ dev_mc_add(dev, atalk_eth_multicast, 6, 1);
return 0;
case SIOCGIFADDR:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: (as189) Fix incorrect Appletalk DDP multicast address
@ 2004-10-03 7:50 Shlomi Yaakobovich
2004-10-05 12:55 ` Marcelo Tosatti
0 siblings, 1 reply; 6+ messages in thread
From: Shlomi Yaakobovich @ 2004-10-03 7:50 UTC (permalink / raw)
To: linux-kernel
Hi all,
Does anyone know what happened to the patch proposed by Alan Stern:
http://www.ussg.iu.edu/hypermail/linux/kernel/0402.1/1147.html
I looked at the latest sources of 2.4 and 2.6 and this patch was not applied to them. Was there a specific reason, was this patch not tested or found buggy ? I believe I have encountered a bug in the system I'm running that is related to this, I found this by accident when debugging appletalk, and found out that someone already saw this...
Can this patch be applied to the next kernel build ? I noticed that it was only for 2.6, I can create a similar patch for 2.4 if needed, I just need to know if there was something wrong with it.
Shlomi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: (as189) Fix incorrect Appletalk DDP multicast address
2004-10-03 7:50 Shlomi Yaakobovich
@ 2004-10-05 12:55 ` Marcelo Tosatti
0 siblings, 0 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2004-10-05 12:55 UTC (permalink / raw)
To: Shlomi Yaakobovich, acme; +Cc: linux-kernel
Arnaldo,
Can you take care of this for us?
On Sun, Oct 03, 2004 at 09:50:44AM +0200, Shlomi Yaakobovich wrote:
> Hi all,
>
> Does anyone know what happened to the patch proposed by Alan Stern:
>
> http://www.ussg.iu.edu/hypermail/linux/kernel/0402.1/1147.html
>
> I looked at the latest sources of 2.4 and 2.6 and this patch was not applied to them. Was there a specific reason, was this patch not tested or found buggy ?
> I believe I have encountered a bug in the system I'm running that is related to this, I found this by accident when debugging appletalk, and found out that someone already
>saw this...
>
> Can this patch be applied to the next kernel build ? I noticed that it was only for 2.6, I can create a similar patch for 2.4 if needed, I just need to know if there was something wrong with it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: PATCH: (as189) Fix incorrect Appletalk DDP multicast address
@ 2004-10-24 13:08 Shlomi Yaakobovich
0 siblings, 0 replies; 6+ messages in thread
From: Shlomi Yaakobovich @ 2004-10-24 13:08 UTC (permalink / raw)
To: Marcelo Tosatti, acme; +Cc: linux-kernel
Hi,
Has anyone looked at this ? Can we expect to see these changes in the next 2.4.x and 2.6.x ?
Thanks,
Shlomi
> -----Original Message-----
> From: Marcelo Tosatti [mailto:marcelo.tosatti@cyclades.com]
> Sent: Tuesday, October 05, 2004 2:56 PM
> To: Shlomi Yaakobovich; acme@conectiva.com.br
> Cc: linux-kernel
> Subject: Re: PATCH: (as189) Fix incorrect Appletalk DDP
> multicast address
>
>
>
> Arnaldo,
>
> Can you take care of this for us?
>
>
> On Sun, Oct 03, 2004 at 09:50:44AM +0200, Shlomi Yaakobovich wrote:
> > Hi all,
> >
> > Does anyone know what happened to the patch proposed by Alan Stern:
> >
> > http://www.ussg.iu.edu/hypermail/linux/kernel/0402.1/1147.html
> >
> > I looked at the latest sources of 2.4 and 2.6 and this
> patch was not applied to them. Was there a specific reason,
> was this patch not tested or found buggy ?
> > I believe I have encountered a bug in the system I'm
> running that is related to this, I found this by accident
> when debugging appletalk, and found out that someone already
> >saw this...
> >
> > Can this patch be applied to the next kernel build ? I
> noticed that it was only for 2.6, I can create a similar
> patch for 2.4 if needed, I just need to know if there was
> something wrong with it.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-10-24 13:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-12 21:24 PATCH: (as189) Fix incorrect Appletalk DDP multicast address Alan Stern
2004-02-14 20:54 ` Arnaldo Carvalho de Melo
[not found] <200402131102.30325.ioe-lkml@rameria.de>
2004-02-13 16:35 ` Alan Stern
-- strict thread matches above, loose matches on Subject: below --
2004-10-03 7:50 Shlomi Yaakobovich
2004-10-05 12:55 ` Marcelo Tosatti
2004-10-24 13:08 Shlomi Yaakobovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox