| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Instead of having a fixed buffer of 16 bytes for the interface name,
tailor size of new ll_cache entry using the interface name's actual
length. This also makes sure the following call to strcpy() is safe.
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
|
| |
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This big patch was compiled by vimgrepping for memset calls and changing
to C99 initializer if applicable. One notable exception is the
initialization of union bpf_attr in tc/tc_bpf.c: changing it would break
for older gcc versions (at least <=3.4.6).
Calls to memset for struct rtattr pointer fields for parse_rtattr*()
were just dropped since they are not needed.
The changes here allowed the compiler to discover some unused variables,
so get rid of them, too.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
|
|
|
|
|
|
| |
Rename hlist.h to list.h while adding it to be aligned with kernel
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two commands are added:
- ip netns list-id
- ip monitor nsid
A cache is also added to remember the association between the iproute2 netns
name (from /var/run/netns/) and the nsid.
To avoid interfering with the rth socket, a new rtnl socket (rtnsh) is used to
get nsid (we may send rtnl request during listing on rth).
Example:
$ ip netns list-id
nsid 0 (iproute2 netns name: foo)
$ ip monitor nsid
Deleted nsid 0 (iproute2 netns name: foo)
nsid 16 (iproute2 netns name: bar)
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
| |
ll_index can return -1 but was declared unsigned.
rt_addr_n2a had unused length parameter
|
|
|
|
|
| |
Make ll_ functions faster by having a name hash, and allow
for deletion. Also, allow them to work without calling ll_init_map.
|
|
|
|
| |
Better to get prototype from system headers
|
|
|
|
| |
The address was being stored but not used by current code.
|
|
|
|
|
|
|
| |
Both rtnl_talk and rtnl_dump had a callback for handling portions
of netlink message that do not match the correct pid or seq.
But this callback was never used by any part of iproute2 so remove
it.
|
|
|
|
|
|
|
| |
In preparation for adding name hash:
* add const
* use same types in cache as ifinfomsg
* rename idxmap to ll_cache
|
|
|
|
|
|
|
| |
Avoid initializing the LL map (which involves a costly RTNL dump)
multiple times. This can happen when running in batch mode.
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
|
|
|
|
| |
The default of 16 is too small for users with 10,000 interfaces.
|
|
|
|
|
|
|
|
|
|
| |
ip addrlabel outputs if%d names due to missing init call:
$ ip addrlabel s
prefix a::42/128 dev if4 label 1000
Also, ip did not accept "if%d" interfaces on input.
Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
|
|
|
|
|
|
|
| |
After calling ll_init_map, all of the information stored in the link-layer map
can be retrieved by function calls (ll_index_to_*), except for the link-layer
address. This patch fills the gap by adding a ll_index_to_addr function.
Changes welcome.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
|
|
|
|
|
|
| |
Extend the link-layer address field from 8 to 20 bytes to support InfiniBand.
Signed-off-by: David Ward <david.ward@ll.mit.edu>
|
|
|
|
|
|
|
|
|
| |
In order to support these new flags add current
linux/if.h into the directory with the local copies.
This caused troubles with outdated redefinitions from net/if.h
so I've removed the dependency on it.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
|
|
|
|
|
| |
Go through source files and remove all trailing whitespace
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
|
| |
|
|
|
|
|
|
| |
because of that code rewrites the nlmsghdr.
(Logical change 1.106)
|
|
|
|
| |
(Logical change 1.77)
|
| |
|
|
|