Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Oct 2021 13:44:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 258845] iflib: error from IFDI_PROMISC_SET() not handled
Message-ID:  <bug-258845-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 258845
           Summary: iflib: error from IFDI_PROMISC_SET() not handled
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

iflib_if_ioctl has:

  4360          case SIOCSIFFLAGS:
  4361                  CTX_LOCK(ctx);
  4362                  if (if_getflags(ifp) & IFF_UP) {
  4363                          if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) {
  4364                                  if ((if_getflags(ifp) ^
ctx->ifc_if_flags) &
  4365                                      (IFF_PROMISC | IFF_ALLMULTI)) {
  4366                                          CTX_UNLOCK(ctx);
  4367                                          err =3D IFDI_PROMISC_SET(ct=
x,
if_getflags(ifp));
  4368                                          CTX_LOCK(ctx);
  4369                                  }
  4370                          } else
  4371                                  reinit =3D 1;
  4372                  } else if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) {
  4373                          iflib_stop(ctx);
  4374                  }
  4375                  ctx->ifc_if_flags =3D if_getflags(ifp);
  4376                  CTX_UNLOCK(ctx);
  4377                  break;

Note that ctx->ifc_if_flags is set regardless of error return from
IFDI_PROMISC_SET(). Assume that IFDI_PROMISC_SET() fails for some reason. A
subsequent SIOCSIFFLAGS call to set promisc or allmulti should result in
another  IFDI_PROMISC_SET() call but will be skipped due to the comparison =
at
line 4364.

--=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-258845-227>