Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Nov 2020 13:12:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 251047] Multicast: Not possible to add MFC entry's when MAXVIFS = 64
Message-ID:  <bug-251047-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D251047

            Bug ID: 251047
           Summary: Multicast: Not possible to add MFC entry's when
                    MAXVIFS =3D 64
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: louis.freebsd@xs4all.nl

*Problem description*
When using MAXVIFS=3D32 multicast is OK. However(!) it is failing with MAXV=
IFS =3D
64.=20
The problem is visual, when trying to add MFC entry's.=20
The call ^setsockopt(socket, IPPROTO_IP, MRT_ADD_MFC, (char *)&mc, sizeof(m=
c))^
result in ^Invalid argument^ for unkown reason.=20

Given that people need more than 32 VIFS nowadays, that is a problem.
Assuming MAXVIFS > 32 is supported, it is a bug.

I discovered the problem using FreeBSD12.1 now using 12.2-FINAL.=20
I did not test this on previous OS versions.



** Successful tests (for reference!) **=20
- Tests by ^troglobit^ with pimd (version3 beta) in conjunction with
FreeBSD12.2-final using MAXVIFS32 on a vm where successful
- Tests on pfSense version2.5 based on FreebSD 12.2 compiled with MAXVIFS32
where successful
- 20201111 After the test, I contacted Netgate (pfSense developer) which re=
vert
the number of VIFS back to 32 =3D=3D> Problem gone !!=20



** Failing test **
- pfSense router running version2.5 based on FreebSD 12.2, FreebSD compiled
with MAXVIFS =3D 64



>>>> Here the test results <<<<

*Test setup details*
- all tests are based on pimd repository 20201105 and FreeBSD
12.2-Release/Stable
- it has no use testing with the formal pimd2, since it is NOT compatible w=
ith
FreeBSD12
- pimd is using ip_mroute.h mfcctl structs
- the tests which failed where performed using MAXVIFS64 builds, the succes=
ful
testes builds using MAXVIFS32
- pfSence and pimd setup where identical during the tests
- extra tests where executed with debugstatements added to pimd=20
- my pfSense setup has Intel x520 for 2x10G, 2x Intel 1G as 1G-lagg, em0 as
internet connection=20
- all trafic is using VLAN's=20



*Test result summary (most important events, os calls and debug info)*

# pimd version 3.0-beta1 starting ...


# Open the IGMP-socket
IGMP socket created. Id 3: Device not configured (igmp_socket =3D socket(AF=
_INET,
SOCK_RAW, IPPROTO_IGMP);
=3D=3D> OK


# Installing VIFS (vlan interfaces)
VIF #4: Installing ix1.116 (192.168.116.1 on subnet 192.168.116) rate 0
VIF #3: Installing ix0.14 (192.168.14.1 on subnet 192.168.14) rate 0
VIF #2: Installing lagg0.16 (192.168.1.1 on subnet 192.168.1) rate 0
=3D=3D> OK


# More actions (for info)
Local Cand-RP address 192.168.14.1, priority 0, interval 60 sec
Local static RP: 169.254.0.1, group 232.0.0.0/8
Local static RP: 192.168.14.15, group 239.0.0.0/8
=3D=3D> OK=20


# Setting up MRT_Table etc=20
v =3D 1
/* Try to enable or disable multicast forwarding in the kernel  */
setsockopt(socket, IPPROTO_IP, MRT_INIT, (char *)&v, sizeof(int))
setsockopt(socket, IPPROTO_IP, MRT_PIM, (char *)&v, sizeof(int))
MRT_TABLE set for socketid 3, sizeof^int^ 4
=3D=3D> Probably OK


#  /* Tell kernel to add, start this vif */
k_add_vif(igmp_socket, vifi, &uvifs[vifi]);=20
logit(LOG_INFO, 0, "VIF #%u: now in service, interface %s UP", vifi,
v->uv_name);
VIF #3: now in service, interface ix0.14 UP
VIF #2: now in service, interface lagg0.16 UP
=3D=3D> OK


# Here the problem related to adding MFC entry's
>>> setsockopt(socket, IPPROTO_IP, MRT_ADD_MFC, (char *)&mc, sizeof(mc)) <<<
sizeof_mc =3D 44 inputstr =3D ^lagg0.16^
socketid =3D 3 uvifs =3D 2272400 oifs =3D 7615154 no_of_vifs =3D 6
=3D=3D> The Problem occurs here

>>>>
Failed adding MFC entry src 192.168.1.36 grp 239.255.255.250 from lagg0.16 =
to
lagg0.26, ix0.14, ix1.116, register_vif0: Invalid argument
<<<<

Failed adding MFC entry vivi_t 2

All Add MFC entry's failed this way!

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-251047-227>