<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/rtnetlink.c, branch v2.6.25.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core/rtnetlink.c?h=v2.6.25.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core/rtnetlink.c?h=v2.6.25.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-05-01T21:44:32Z</updated>
<entry>
<title>RTNETLINK: Fix bogus ASSERT_RTNL warning</title>
<updated>2008-05-01T21:44:32Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2008-04-24T05:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7b6f7f4d0fe48c84a499292947cc1bfcb74e6fc5'/>
<id>urn:sha1:7b6f7f4d0fe48c84a499292947cc1bfcb74e6fc5</id>
<content type='text'>
[ Upstream commit: c9c1014b2bd014c7ec037bbb6f58818162fdb265 ]

ASSERT_RTNL uses mutex_trylock to test whether the rtnl_mutex is
held. This bogus warnings when running in atomic context, which
f.e. happens when adding secondary unicast addresses through
macvlan or vlan or when synchronizing multicast addresses from
wireless devices.

Mid-term we might want to consider moving all address updates
to process context since the locking seems overly complicated,
for now just fix the bogus warning by changing ASSERT_RTNL to
use mutex_is_locked().

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[RTNL]: Validate hardware and broadcast address attribute for RTM_NEWLINK</title>
<updated>2008-02-24T03:54:36Z</updated>
<author>
<name>Thomas Graf</name>
<email>tgraf@suug.ch</email>
</author>
<published>2008-02-24T03:54:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1840bb13c22f5b8fd2e242e36c8d6ea3f312be67'/>
<id>urn:sha1:1840bb13c22f5b8fd2e242e36c8d6ea3f312be67</id>
<content type='text'>
RTM_NEWLINK allows for already existing links to be modified. For this
purpose do_setlink() is called which expects address attributes with a
payload length of at least dev-&gt;addr_len. This patch adds the necessary
validation for the RTM_NEWLINK case.

The address length for links to be created is not checked for now as the
actual attribute length is used when copying the address to the netdevice
structure. It might make sense to report an error if less than addr_len
bytes are provided but enforcing this might break drivers trying to be
smart with not transmitting all zero addresses.

Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[RTNL]: Add missing link netlink attribute policy definitions</title>
<updated>2008-02-20T00:12:08Z</updated>
<author>
<name>Thomas Graf</name>
<email>tgraf@suug.ch</email>
</author>
<published>2008-02-20T00:12:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=76e87306c2de2a581ec939cf9c97cd18d053f90e'/>
<id>urn:sha1:76e87306c2de2a581ec939cf9c97cd18d053f90e</id>
<content type='text'>
IFLA_LINK is no longer a write-only attribute on the kernel side and
must thus be validated. Same goes for the newly introduced
IFLA_LINKINFO.

Fixes undefined behaviour if either of the attributes are not well
formed.

Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "[RTNETLINK]: Send a single notification on device state changes."</title>
<updated>2008-02-18T02:35:07Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2008-02-18T02:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93b2d4a208eeb19bff95e98c34503ce4b03cd0f9'/>
<id>urn:sha1:93b2d4a208eeb19bff95e98c34503ce4b03cd0f9</id>
<content type='text'>
This reverts commit 45b503548210fe6f23e92b856421c2a3f05fd034.

It break locking around dev-&gt;link_mode as well as cause
other bootup problems.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[RTNETLINK]: Send a single notification on device state changes.</title>
<updated>2008-02-13T06:42:09Z</updated>
<author>
<name>Laszlo Attila Toth</name>
<email>panther@balabit.hu</email>
</author>
<published>2008-02-13T06:42:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=45b503548210fe6f23e92b856421c2a3f05fd034'/>
<id>urn:sha1:45b503548210fe6f23e92b856421c2a3f05fd034</id>
<content type='text'>
In do_setlink() a single notification is sent at the end of the
function if any modification occured. If the address has been changed,
another notification is sent.

Both of them is required because originally only the NETDEV_CHANGEADDR
notification was sent and although device state change implies address
change, some programs may expect the original notification. It remains
for compatibity.

If set_operstate() is called from do_setlink(), it doesn't send a
notification, only if it is called from rtnl_create_link() as earlier.

Signed-off-by: Laszlo Attila Toth &lt;panther@balabit.hu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET] rtnetlink.c: remove no longer used functions</title>
<updated>2008-02-05T11:17:22Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-02-05T11:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03245ce2f03228d681580c30c435225efadca602'/>
<id>urn:sha1:03245ce2f03228d681580c30c435225efadca602</id>
<content type='text'>
This patch removes the following no longer used functions:
- rtattr_parse()
- rtattr_strlcpy()
- __rtattr_parse_nested_compat()

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Namespace stop vs 'ip r l' race.</title>
<updated>2008-01-28T23:08:08Z</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-01-19T07:55:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=775516bfa2bd7993620c9039191a0c30b8d8a496'/>
<id>urn:sha1:775516bfa2bd7993620c9039191a0c30b8d8a496</id>
<content type='text'>
During network namespace stop process kernel side netlink sockets
belonging to a namespace should be closed. They should not prevent
namespace to stop, so they do not increment namespace usage
counter. Though this counter will be put during last sock_put.

The raplacement of the correct netns for init_ns solves the problem
only partial as socket to be stoped until proper stop is a valid
netlink kernel socket and can be looked up by the user processes. This
is not a problem until it resides in initial namespace (no processes
inside this net), but this is not true for init_net.

So, hold the referrence for a socket, remove it from lookup tables and
only after that change namespace and perform a last put.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Tested-by: Alexey Dobriyan &lt;adobriyan@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Consolidate kernel netlink socket destruction.</title>
<updated>2008-01-28T23:08:07Z</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-01-28T22:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b7c6ba6eb1234e35a74fb8ba8123232a7b1ba9e4'/>
<id>urn:sha1:b7c6ba6eb1234e35a74fb8ba8123232a7b1ba9e4</id>
<content type='text'>
Create a specific helper for netlink kernel socket disposal. This just
let the code look better and provides a ground for proper disposal
inside a namespace.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Tested-by: Alexey Dobriyan &lt;adobriyan@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Memory leak on network namespace stop.</title>
<updated>2008-01-28T23:08:06Z</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-01-19T07:54:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f84d82f7a623f8641af2574425c329431ff158f'/>
<id>urn:sha1:4f84d82f7a623f8641af2574425c329431ff158f</id>
<content type='text'>
Network namespace allocates 2 kernel netlink sockets, fibnl &amp;
rtnl. These sockets should be disposed properly, i.e. by
sock_release. Plain sock_put is not enough.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Tested-by: Alexey Dobriyan &lt;adobriyan@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Make the netlink methods in rtnetlink handle multiple network namespaces</title>
<updated>2008-01-28T22:54:26Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2007-11-20T06:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b3da706bbe4613d2fe4df8df4d965954ea98964'/>
<id>urn:sha1:4b3da706bbe4613d2fe4df8df4d965954ea98964</id>
<content type='text'>
After the previous prep work this just consists of removing checks
limiting the code to work in the initial network namespace, and
updating rtmsg_ifinfo so we can generate events for devices in
something other then the initial network namespace.

Referring to network other network devices like the IFLA_LINK
and IFLA_MASTER attributes do, gets interesting if those network
devices happen to be in other network namespaces.  Currently
ifindex numbers are allocated globally so I have taken the path
of least resistance and not still report the information even
though the devices they are talking about are invisible.

If applications start getting confused or when ifindex
numbers become local to the network namespace we may need
to do something different in the future.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Denis V. Lunev &lt;den@openz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
