Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754381Ab3DOK3e (ORCPT ); Mon, 15 Apr 2013 06:29:34 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.160]:21918 "EHLO mo-p00-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717Ab3DOK3d (ORCPT ); Mon, 15 Apr 2013 06:29:33 -0400 X-RZG-AUTH: :P20JeEWkefDI1ODZs1HHtgV3eF0OpFsRaGIBBWYxhJvJPtnXtogBWn6YvUkYzDKvBT07wx/0LJ4BNA== X-RZG-CLASS-ID: mo00 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_8c1278b61f2227e21bbb3a7ae3ef6627" Date: Mon, 15 Apr 2013 12:29:10 +0200 From: michael-dev To: Cc: , , , , Subject: [PATCH] Notify userspace about bridge learning MAC on new port Reply-To: Mail-Reply-To: Message-ID: <7a31d9fe5bc9b65d4ffe6e03cbd2823f@fami-braun.de> User-Agent: Roundcube Webmail/0.8.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2788 Lines: 55 --=_8c1278b61f2227e21bbb3a7ae3ef6627 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed Hi, currently, the userspace is informed about the port the MAC is learned on a bridge and about the bridge removing the MAC from its forwarding table, but not when the MAC is learned on a different port. This is inconsistent and makes it difficult for applications to keep track of all MACs learned by a bridge on a subset of its ports. Please find attached a patch that fixes this by sending an RTM_NEWNEIGH message when the forwarding destination port changes. Regards, M. Braun --=_8c1278b61f2227e21bbb3a7ae3ef6627 Content-Transfer-Encoding: base64 Content-Type: text/plain; name=999-make-bridge-notify-switched-port.diff Content-Disposition: attachment; filename=999-make-bridge-notify-switched-port.diff; size=1213 Tm90aWZ5IHVzZXJzcGFjZSBhYm91dCBicmlkZ2UgbGVhcm5pbmcgTUFDIG9uIG5ldyBwb3J0CgpD dXJyZW50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Agdm9pZCBicl9m ZGJfdXBkYXRlKHN0cnVjdCBuZXRfYnJpZGdlICpicgogCQkJCQlzb3VyY2UtPmRldi0+bmFtZSk7 CiAJCX0gZWxzZSB7CiAJCQkvKiBmYXN0cGF0aDogdXBkYXRlIG9mIGV4aXN0aW5nIGVudHJ5ICov CisJCQlvcmlnc3JjID0gZmRiLT5kc3Q7CiAJCQlmZGItPmRzdCA9IHNvdXJjZTsKIAkJCWZkYi0+ dXBkYXRlZCA9IGppZmZpZXM7CisJCQkvKiBub3RpZnkgYXBwbGljYXRpb25zIG9mIG1vZGlmaWVk IHNsYXZlIGRldmljZSAqLworCQkJaWYgKG9yaWdzcmMgIT0gc291cmNlKQorCQkJCWZkYl9ub3Rp ZnkoYnIsIGZkYiwgUlRNX05FV05FSUdIKTsKIAkJfQogCX0gZWxzZSB7CiAJCXNwaW5fbG9jaygm YnItPmhhc2hfbG9jayk7Cg== --=_8c1278b61f2227e21bbb3a7ae3ef6627-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/