freebsd-skq/sys/netgraph
glebius 929b129a0a From the RFC2516 it is not clear, what is the correct behavior for a
PPPoE AC, servicing a specific Service-Name, when client sends a PADI
with an empty Service-Name. Should it reply with all available service
names or should it be silent? Our implementation had chosen the latter,
while some other had chosen the former (they say Linux and Cisco). Now
some PPPoE clients appear, that rely on the assumption that AC will
send all names in a PADO reply to a PADI with wildcard Service-Name.
These clients can't connect to FreeBSD AC.

I have requested comments from authors of RFC2516 via email, but
received no reply.

This change makes FreeBSD AC compatible with D-Link DI-614+ and
D-Link DI-624+ SOHO routers, and probably others.

Big thanks to D-Link's Russian office, namely Victor Platov, for
assistance and support in investigation and testing of this change.

Details:
  o Split pppoe_match_svc() into three different functions serving
    different purposes:
    - pppoe_match_svc() - match non-empty Service-Name tag from PADI
      against all available hooks in listening state.
    - pppoe_find_svc() - check that given Service-Name is not yet
      registered.
    - pppoe_broadcast_padi() - send a copy of PADI packet with empty
      Service-Name tag to all listening hooks.
  o For NGM_PPPOE_LISTEN message use pppoe_find_svc().
  o In ng_pppoe_rcvdata() in a PADI case use pppoe_match_svc() for
    a non-empty Service-Name tag, and pppoe_broadcast_padi() in
    either case.

A side effect from the above changes is that now pppoed(8) and mpd
will reply to a empty Service-Name PADI sending a PADO with two
Service-Name tags - an empty one and correct one. This is not fatal,
and will be corrected in pppoed(8) and mpd later. No need to update
node interface version.

Supported by:	D-Link
2006-01-26 13:06:49 +00:00
..
atm Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
bluetooth Fix -Wundef from compiling the amd64 LINT. 2005-12-04 10:06:06 +00:00
netflow Correct off-by-one errors. 2006-01-14 12:26:32 +00:00
netgraph.h Provide additional macros for sending netgraph items, which allow 2006-01-12 22:44:04 +00:00
ng_async.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_async.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_atmllc.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_atmllc.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_base.c - Print also node ID in ktr(9) messages. [1] 2006-01-12 22:41:32 +00:00
ng_bpf.c Fix build without BPF_JITTER option. 2005-12-07 21:41:45 +00:00
ng_bpf.h Fix typo in a comment. 2005-02-12 18:10:26 +00:00
ng_bridge.c In revision 1.29 timeout() was converted to ng_callout(). 2005-02-09 15:14:44 +00:00
ng_bridge.h Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
ng_cisco.c NG_MKRESPONSE() macro includes sizeof struct ng_mesg when doing allocation. 2005-04-13 14:03:28 +00:00
ng_cisco.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_device.c Change m_uiotombuf so it will accept offset at which data should be copied 2005-05-04 18:55:03 +00:00
ng_device.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_echo.c - Return error, if there was one. 2005-04-15 10:14:00 +00:00
ng_echo.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_eiface.c Simplify setting the link-level address. 2005-11-08 09:03:06 +00:00
ng_eiface.h Added ASCII version of the NGM_EIFACE_GET_IFNAME message, "getifname". 2005-02-03 11:52:42 +00:00
ng_etf.c Remove ng_connect_t where it is unused. Probably it remained from ng_source.c. 2005-03-14 20:49:48 +00:00
ng_etf.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_ether.c Do not force queueing on peer hooks. This was important only for 2006-01-12 21:09:12 +00:00
ng_ether.h Add new netgraph control message NGM_ETHER_DETACH, which actually 2005-02-14 12:01:09 +00:00
ng_fec.c - Store pointer to the link-level address right in "struct ifnet" 2005-11-11 16:04:59 +00:00
ng_fec.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_frame_relay.c Initialize variable. 2006-01-14 21:49:31 +00:00
ng_frame_relay.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_gif_demux.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_gif_demux.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_gif.c Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
ng_gif.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_hole.c Fix memory leak. 2005-12-09 07:09:44 +00:00
ng_hole.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_hub.c Having moved metadata usage to mbuf tags, remove code that supports 2004-06-26 22:24:16 +00:00
ng_hub.h A simple packet distribution node type that acts like an Ethernet hub. 2004-04-17 12:42:17 +00:00
ng_iface.c Style and other fixes for the last commit. 2005-10-11 09:11:57 +00:00
ng_iface.h Bump cookie value to reflect change in NGM_IFACE_GET_IFNAME semantics. 2005-02-13 16:36:41 +00:00
ng_ip_input.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_ip_input.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_ipfw.c Fix check for leading zero, so that it does not block two zeroes 2005-05-29 12:20:41 +00:00
ng_ipfw.h Add a ng_ipfw node, implementing a quick and simple interface between 2005-02-05 12:06:33 +00:00
ng_ksocket.c When we read data from socket buffer using soreceive() the socket layer 2005-09-06 17:15:42 +00:00
ng_ksocket.h Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
ng_l2tp.c Use the ISO standard function variable vs. a GCC'ism. 2005-08-10 06:25:41 +00:00
ng_l2tp.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_lmi.c Remove dead code. 2006-01-14 14:17:27 +00:00
ng_lmi.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_message.h In the splnet(9) times netgraph(4) was synchronous and if a message 2006-01-12 19:14:40 +00:00
ng_mppc.c In preparation for making the modules actually use opt_*.h files 2005-10-14 23:17:45 +00:00
ng_mppc.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_nat.c - After LibAlias processing check for TCP packet with th_x2 field 2005-06-27 07:39:13 +00:00
ng_nat.h ng_nat - a netgraph(4) node, which does NAT 2005-05-05 23:41:21 +00:00
ng_one2many.c Fix getting stats from many links with index > 0. 2005-03-11 10:29:38 +00:00
ng_one2many.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_parse.c Fix two accesses to uninitialized variables that a revision 1.27 2006-01-18 16:09:00 +00:00
ng_parse.h Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
ng_ppp.c Refactor places where ng_package_data() failed. 2005-05-16 19:12:57 +00:00
ng_ppp.h Fix incorrect comment. 2005-02-10 02:43:26 +00:00
ng_pppoe.c From the RFC2516 it is not clear, what is the correct behavior for a 2006-01-26 13:06:49 +00:00
ng_pppoe.h Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
ng_pptpgre.c Rework locking, that I have introduced recently, since it was incorrect: 2005-09-08 14:26:23 +00:00
ng_pptpgre.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_rfc1490.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_rfc1490.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_sample.c Whitespace. 2005-02-06 19:24:59 +00:00
ng_sample.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_socket.c Use sparse initializers for "struct domain" and "struct protosw", 2005-11-09 13:29:16 +00:00
ng_socket.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_socketvar.h In the splnet times, netgraph was functional and synchronous. Nowadays, 2005-07-05 17:35:20 +00:00
ng_source.c Simplify ng_source_send() removing temporary queue and merging two 2006-01-23 10:28:04 +00:00
ng_source.h Implement an upper limit for packets per second sent by node. 2005-12-23 19:14:38 +00:00
ng_split.c Plug item leak in case when not all hooks are connected. 2005-08-29 13:47:08 +00:00
ng_split.h Make the cookie constant name canonical. 2005-10-25 20:56:12 +00:00
ng_sppp.c Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ng_sppp.h Parse "getifname" using the standard parse string type. 2005-02-03 13:03:31 +00:00
ng_tcpmss.c - Remove redundant parenthesis in M_CHECK macro. 2005-06-10 12:44:21 +00:00
ng_tcpmss.h Add ng_tcpmss node, which alters MSS options of TCP packets. Useful to 2005-06-10 08:02:34 +00:00
ng_tee.c Update statistics only in case if delivery was successfull. 2005-06-07 12:22:13 +00:00
ng_tee.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_tty.c Use new (inline) functions for calls into driver. 2005-10-16 20:44:18 +00:00
ng_tty.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_UI.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_UI.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_vjc.c Use __LP64__ to check for the 64-bit pointer type, and fix -Wundef. 2005-12-04 00:25:03 +00:00
ng_vjc.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ng_vlan.c When netgraph flow control message comes from downstream, broadcast 2005-04-20 14:19:20 +00:00
ng_vlan.h Use variable-sized arrays where appropriate. 2005-10-28 14:41:28 +00:00
NOTES