Hello everybody,

About a month ago, I subscribed to a new ISP which doesn't want to give
alternate access to Internet to using their blackbox-router.
So I sniffed packets, got my PPPoE username, password, and the VLAN id
they filter.
I reproduced those parameters with my pppoe(4)/vlan(4) config, but it
still wouldn't establish a session (no answer back at all).
Then I looked a little closer and saw that the default vlan prio set on
the packets were not matching, the ISP-box would use a 0-bit prio,
while the OpenBSD default prio was set to 1.
So I set in my /etc/hostname.vlan0 a vlan prio of 0, with "txprio 0".
This still wouldn't fix the issue, and actually the VLAN priority bit
on the packets were still set to 1.
I then try to tinker with lladdr prio (pppoe and vlan), as I saw in the
documentation that this could influence on the vlan prio setting.
Still no luck, so I went to the source and surprise, I saw that the
vlan packet prio bit 0/1 are transparently inverted in the driver.
So I got back to my configuration, cleaned it up, set my txprio to 1,
got a 0 in the packets, session established.

Sorry for the long introduction story, but I wanted to give some
context about my coming to reading the documentation and struggling
with it.
Note that I had some great help from kelm (kn@) who got me some insight
and lead me to fix it.

Now, I think we can improve on this. We thought a bit about that and
came with two possible solutions, one would be just to document that
the vlan tx/rxprio are the 802.1p values, and are transparently
inversed by the driver for the prios 0 and 1 in the PCP field, as per
the RFC (which is hard to find, and then it's still not that obvious in
it).

The other would be to keep the value set in the driver configuration as
PCP value, so not transparently invert it, because that's what one
would expect to set there (IMHO).
But then, we should move up the semantic difference at the level where
they differ, like in pf prio settings, where here the priority order is
linear. The change would be done there if the underlying media is a
vlan if.
There might be other places where this semantic discrepancy would need
a modification.

This message doesn't come with a patch (although I have some local work
done) because I wanted to have a bit more feedback about the changes
proposal before going further.

Thank you for reading!

Reply via email to