Bug 252532 - ifconfig incorrectly displays stp roles
Summary: ifconfig incorrectly displays stp roles
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Many People
Assignee: Kristof Provost
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-08 20:16 UTC by jcaplan
Modified: 2021-11-04 17:32 UTC (History)
2 users (show)

See Also:


Attachments
proposed patch (595 bytes, patch)
2021-01-12 18:43 UTC, jcaplan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jcaplan 2021-01-08 20:16:06 UTC
Overview: 

Steps to Reproduce:

1. create a bridge
2. add a member interface
3. enable stp for the member
4. check member role in ifconfig output


Actual Results: 

# ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500                                                                                                                               
        ether 58:9c:fc:10:ff:e0                                                                                                                                                                             
        id 02:21:4d:ed:52:0b priority 32768 hellotime 2 fwddelay 15                                                                                                                                         
        maxage 20 holdcnt 6 proto stp-rstp maxaddr 2000 timeout 1200                                                                                                                                        
        root id 02:21:4d:ed:52:0a priority 32768 ifcost 2000 port 11                                                                                                                                        
        member: epair2b flags=1c7<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>                                                                                                                               
                ifmaxaddr 0 port 11 priority 128 path cost 2000 <unknown proto 2>                                                                                                                           
                <unknown role 1> state forwarding                                


Expected Results: 

# ifconfig bridge0
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500                                                                                                                               
        ether 58:9c:fc:10:ff:e0                                                                                                                                                                             
        id 02:21:4d:ed:52:0b priority 32768 hellotime 2 fwddelay 15                                                                                                                                         
        maxage 20 holdcnt 6 proto stp-rstp maxaddr 2000 timeout 1200                                                                                                                                        
        root id 02:21:4d:ed:52:0a priority 32768 ifcost 2000 port 11                                                                                                                                        
        member: epair2b flags=1c7<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>                                                                                                                               
                ifmaxaddr 0 port 11 priority 128 path cost 2000 <unknown proto 2>                                                                                                                           
                role root state forwarding                                

Build Date & Hardware:

13.0-CURRENT FreeBSD 13.0-CURRENT #0 r368820: Tue Jan  5 17:30:19 EST 2021
Comment 1 jcaplan 2021-01-12 18:43:01 UTC
Created attachment 221504 [details]
proposed patch
Comment 2 Kristof Provost freebsd_committer 2021-01-30 13:56:56 UTC
https://reviews.freebsd.org/D28425

I'll try to get this in before 13.0.
Comment 3 commit-hook freebsd_committer 2021-02-01 14:27:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=88be0e11205e4a2dc77e29f7b4a2e82b8d7c9a5c

commit 88be0e11205e4a2dc77e29f7b4a2e82b8d7c9a5c
Author:     Jonah Caplan <jcaplan@blackberry.com>
AuthorDate: 2021-01-30 13:54:09 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-02-01 14:27:06 +0000

    bridge: fix STP roles and protos strings

    Add the missing commas that got lost in e5539fb618cc7.

    PR:             252532
    Reviewd by:     kp@, donner@, freqlabs@
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D28425

 sys/net/if_bridgevar.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Comment 4 commit-hook freebsd_committer 2021-02-04 14:23:42 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=683d086626cd41a1c22c7ab5cd1c3c52591c5bf7

commit 683d086626cd41a1c22c7ab5cd1c3c52591c5bf7
Author:     Jonah Caplan <jcaplan@blackberry.com>
AuthorDate: 2021-01-30 13:54:09 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-02-04 14:22:45 +0000

    bridge: fix STP roles and protos strings

    Add the missing commas that got lost in e5539fb618cc7.

    PR:             252532
    Reviewd by:     kp@, donner@, freqlabs@
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D28425

    (cherry picked from commit 88be0e11205e4a2dc77e29f7b4a2e82b8d7c9a5c)

 sys/net/if_bridgevar.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Comment 5 commit-hook freebsd_committer 2021-02-04 14:23:44 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=ad60792666831d6beafbc555cc1fec0305d7f8f5

commit ad60792666831d6beafbc555cc1fec0305d7f8f5
Author:     Jonah Caplan <jcaplan@blackberry.com>
AuthorDate: 2021-01-30 13:54:09 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-02-04 08:13:43 +0000

    bridge: fix STP roles and protos strings

    Add the missing commas that got lost in e5539fb618cc7.

    PR:             252532
    Reviewd by:     kp@, donner@, freqlabs@
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D28425

    (cherry picked from commit 88be0e11205e4a2dc77e29f7b4a2e82b8d7c9a5c)

 sys/net/if_bridgevar.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)