<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
James Lentini wrote:<br>
<blockquote
cite="midPine.LNX.4.61.0603231155401.23670@jlentini-linux.nane.netapp.com"
type="cite">
<pre wrap="">On Tue, 21 Mar 2006, Jason Gunthorpe wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Tue, Mar 21, 2006 at 03:56:17PM -0800, Stephen Hemminger wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Okay, but there are number of other places in iproute2 that call
ll_addr_a2n() with ifr.ifr_hwaddr.sa_data. And that is 14 bytes.
If you want to fix those it will be harder since it would increase
the sizeof(struct sockaddr) and potentially break compatibility.
</pre>
</blockquote>
<pre wrap="">Maybe the best thing is to upgrade ip (and or netlink?) to use
netlink messages instead of ioctls for the remaining problematic
operations. Since netlink already supports an arbitary length hwaddr
there should be no compatability problem.
Just browsing I see usages of SIOCSIFHWBROADCAST, SIOCSIFHWADDR,
SIOCADDMULTI, SIOCDELMULTI and SIOCGIFHWADDR that use a struct
ifreq..
I know SIOCGIFHWADDR can be done over netlink, but I'm not too
familiar with the others..
</pre>
</blockquote>
<pre wrap=""><!---->
Making ip neighbor work with IPoIB address is what I'm interested in
now.
As you and Jason point out there are a lot of places where ifreqs are
used and hence options that will not support IPoIB addresses.
</pre>
</blockquote>
The sockaddr union is at the end of struct ifreq. Couldn't the union
sockaddr members be changed to sockaddr_storage, and the SIOCxxxx
encoded size bits be changed? dev_ifsioc() would just need to mask out
(or substitute) the size bits before the switch statement.<br>
<br>
- Mark<br>
<br>
<br>
<br>
</body>
</html>