Bug 7802 - [MFC] outbound, fragmented multicast packets are mishandled at the data-link layer
Summary: [MFC] outbound, fragmented multicast packets are mishandled at the data-link ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-09-02 03:20 UTC by mccanne
Modified: 2015-06-17 07:29 UTC (History)
0 users

See Also:


Attachments
file.diff (210 bytes, patch)
1998-09-02 03:20 UTC, mccanne
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mccanne 1998-09-02 03:20:01 UTC
Multicast packets larger than an MTU are fragmented and the fragments beyond the first have an incorrect MAC address because the M_MCAST bit is not copied into the fragmented packets.

Fix: *** netinet/ip_output.c	1998/09/02 00:58:59	1.1
--- netinet/ip_output.c	1998/09/02 01:09:24
***************
How-To-Repeat: Run a multicast application on an ethernet that generates packets larger than the local net's MTU.  Run tcpdump -e and note that the ethernet MAC address does not conform to the IP-to-ethernet address mapping algorithm.
Comment 1 Garrett Wollman freebsd_committer freebsd_triage 1998-09-02 16:11:18 UTC
State Changed
From-To: open->suspended

Fixed in rev. 1.82, still applicable to 2.2. 
Comment 2 Joseph Koshy freebsd_committer freebsd_triage 1998-11-20 03:09:42 UTC
State Changed
From-To: suspended->closed

Fixed in rev 1.82 of "src/sys/netinet/ip_output.c" by wollman. 
Merged to rev 1.44.2.12 of "src/sys/netinet/ip_output.c" by jkoshy.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-04-02 15:48:07 UTC
A commit references this bug:

Author: hselasky
Date: Thu Apr  2 15:47:38 UTC 2015
New revision: 280991
URL: https://svnweb.freebsd.org/changeset/base/280991

Log:
  Extend fixes made in r278103 and r38754 by copying the complete packet
  header and not only partial flags and fields. Firewalls can attach
  classification tags to the outgoing mbufs which should be copied to
  all the new fragments. Else only the first fragment will be let
  through by the firewall. This can easily be tested by sending a large
  ping packet through a firewall. It was also discovered that VLAN
  related flags and fields should be copied for packets traversing
  through VLANs. This is all handled by "m_dup_pkthdr()".

  Regarding the MAC policy check in ip_fragment(), the tag provided by
  the originating mbuf is copied instead of using the default one
  provided by m_gethdr().

  Tested by:		Karim Fodil-Lemelin <fodillemlinkarim at gmail.com>
  MFC after:		2 weeks
  Sponsored by:		Mellanox Technologies
  PR:			7802

Changes:
  head/sys/netinet/ip_output.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-06-17 07:22:34 UTC
A commit references this bug:

Author: hselasky
Date: Wed Jun 17 07:21:44 UTC 2015
New revision: 284496
URL: https://svnweb.freebsd.org/changeset/base/284496

Log:
  MFC r280991:
  Extend fixes made in r278103 and r38754 by copying the complete packet
  header and not only partial flags and fields. Firewalls can attach
  classification tags to the outgoing mbufs which should be copied to
  all the new fragments. Else only the first fragment will be let
  through by the firewall. This can easily be tested by sending a large
  ping packet through a firewall. It was also discovered that VLAN
  related flags and fields should be copied for packets traversing
  through VLANs. This is all handled by "m_dup_pkthdr()".

  Regarding the MAC policy check in ip_fragment(), the tag provided by
  the originating mbuf is copied instead of using the default one
  provided by m_gethdr().

  Tested by:		Karim Fodil-Lemelin <fodillemlinkarim at gmail.com>
  Sponsored by:		Mellanox Technologies
  PR:			7802

Changes:
_U  stable/10/
  stable/10/sys/netinet/ip_output.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-06-17 07:29:36 UTC
A commit references this bug:

Author: hselasky
Date: Wed Jun 17 07:28:51 UTC 2015
New revision: 284497
URL: https://svnweb.freebsd.org/changeset/base/284497

Log:
  MFC r280991:
  Extend fixes made in r278103 and r38754 by copying the complete packet
  header and not only partial flags and fields. Firewalls can attach
  classification tags to the outgoing mbufs which should be copied to
  all the new fragments. Else only the first fragment will be let
  through by the firewall. This can easily be tested by sending a large
  ping packet through a firewall. It was also discovered that VLAN
  related flags and fields should be copied for packets traversing
  through VLANs. This is all handled by "m_dup_pkthdr()".

  Regarding the MAC policy check in ip_fragment(), the tag provided by
  the originating mbuf is copied instead of using the default one
  provided by m_gethdr().

  Tested by:		Karim Fodil-Lemelin <fodillemlinkarim at gmail.com>
  Sponsored by:		Mellanox Technologies
  PR:			7802

Changes:
_U  stable/9/sys/
  stable/9/sys/netinet/ip_output.c