Bug 155680 - [multicast] problems with multicast
Summary: [multicast] problems with multicast
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net mailing list
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2011-03-18 21:10 UTC by Hans-Werner Braun
Modified: 2015-06-30 17:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Werner Braun 2011-03-18 21:10:09 UTC
I am having the samae multicast problems with 8.2 that I had with 8.1 in that (as confirmed by tcpdump) the group-join request does not get sent out. It started with 8.1, earlier releases did not have that problem. Upon further testing, this problem appears to be specific to the "re0" interface. It works with an "fxp0" interface, however, it seems to hang the fxp0 interface for sever seconds, alongside "link state changed to DOWN/UP" events. I do not see any problem with msk and ale interfaces, however, those are in laptops, not PCI cards. Can you recommend a PCI-based product that works?

Fix: 

Only fix I know is not to use an re or fxp interface, but I am not sure what is a good PCI choice there.
How-To-Repeat: #!/usr/local/bin/perl

use Socket;

$PORT=$ARGV[0];
$PATTERN=$ARGV[1];
$SERVER=$ARGV[2];

if($PORT eq ""){
 printf"Syntax: mcaststream.pl port {pattern} {multicastaddress}\n";
 exit;
}
if($SERVER eq ""){$SERVER="233.7.117.79";}

$|=1;

$IP_ADD_MEMBERSHIP=12;

($name, $aliases, $type, $len, $SERVERIP) = gethostbyname($SERVER);

$sockaddr = 'S n a4 x8';

socket(S, PF_INET,SOCK_DGRAM,UDP_PROTO)||die("$!");
setsockopt(S, SOL_SOCKET, SO_REUSEPORT, 1)||die("$!");
$us = pack($sockaddr, 2, $PORT, pack("C4", 0,0,0,0));
bind(S, $us)||die("$!");

setsockopt(S, 0, $IP_ADD_MEMBERSHIP, $SERVERIP."\0\0\0\0")||die("$!");

while($theiraddr=recv(S,$BUF,1024,0)){
 ($junk, $junk, $sourceaddr, $junk) = unpack($sockaddr, $theiraddr);
 $theirip=join('.',unpack('C4', $sourceaddr));
 if($BUF =~ $PATTERN){
  printf"$theirip\t$BUF";
 }
}
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-03-19 00:59:04 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Sean Bruno freebsd_committer 2015-06-30 17:32:38 UTC
em(4) or igb(4) would be your best bet here.