lkml.org 
[lkml]   [2022]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 net-next 6/6] selftests: forwarding: add test of MAC-Auth Bypass to locked port tests
On 2022-07-10 09:29, Ido Schimmel wrote:
> On Thu, Jul 07, 2022 at 05:29:30PM +0200, Hans Schultz wrote:
>> +locked_port_mab()
>> +{
>> + RET=0
>> + check_locked_port_support || return 0
>> +
>> + ping_do $h1 192.0.2.2
>> + check_err $? "MAB: Ping did not work before locking port"
>> +
>> + bridge link set dev $swp1 locked on
>> + bridge link set dev $swp1 learning on
>
> I was under the impression that we agreed that learning does not need
> to
> be enabled in the bridge driver
>

Sorry, you are right. I forgot to change it here.

>> +
>> + ping_do $h1 192.0.2.2
>> + check_fail $? "MAB: Ping worked on locked port without FDB entry"
>> +
>> + bridge fdb show | grep `mac_get $h1` | grep -q "locked"
>> + check_err $? "MAB: No locked fdb entry after ping on locked port"
>> +
>> + bridge fdb replace `mac_get $h1` dev $swp1 master static
>> +
>> + ping_do $h1 192.0.2.2
>> + check_err $? "MAB: Ping did not work with fdb entry without locked
>> flag"
>> +
>> + bridge fdb del `mac_get $h1` dev $swp1 master
>> + bridge link set dev $swp1 learning off
>> + bridge link set dev $swp1 locked off
>> +
>> + log_test "Locked port MAB"
>> +}
>> trap cleanup EXIT
>>
>> setup_prepare
>> --
>> 2.30.2
>>

\
 
 \ /
  Last update: 2022-07-12 14:29    [W:0.159 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site