Btw, does anyone know the story behind this interesting, but
slightly distressing comment in /usr/src/linux/net/ipv4/arp.c
Like, does anyone know what is this business about
hard_start_xmit and rebuild_header?
#if 1
/* So... these "amateur" devices are hopeless.
The only thing, that I can say now:
It is very sad that we need to keep ugly obsolete
code to make them happy.
They should be moved to more reasonable state, now
they use rebuild_header INSTEAD OF hard_start_xmit!!!
Besides that, they are sort of out of date
(a lot of redundant clones/copies, useless in 2.1),
I wonder why people believe that they work.
*/
switch (dev->type) {
default:
break;
case ARPHRD_ROSE:
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
case ARPHRD_AX25:
#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
case ARPHRD_NETROM:
#endif
neigh->ops = &arp_broken_ops;
neigh->output = neigh->ops->output;
return 0;
#endif
}
#endif
if (neigh->type == RTN_MULTICAST) {
neigh->nud_state = NUD_NOARP;
arp_mc_map(addr, neigh->ha, dev, 1);
} else if (dev->flags&(IFF_NOARP|IFF_LOOPBACK)) {
neigh->nud_state = NUD_NOARP;
I'm sort of meditating now, on exactly how this works.
I'm trying to figure out whether in order
to get this to work, I need to come up with some kind of mapping
from multicast addresses to AX25 destination callsigns. Or whether
the rest of the code can live without this. I think, this is just a filter
mechanism -- so it shouldn't matter.
int arp_mc_map(u32 addr, u8 *haddr, struct device *dev, int dir)
{
switch (dev->type) {
case ARPHRD_ETHER:
case ARPHRD_IEEE802:
case ARPHRD_FDDI:
ip_eth_mc_map(addr, haddr);
return 0;
default:
if (dir) {
memcpy(haddr, dev->broadcast, dev->addr_len);
return 0;
}
}
return -EINVAL;
}
The igmp packets do make it to mrouted, I've figured out. Or mrouted's logs
look the same whether I'm listening on ethernet or on ax25.