Patch binary so that Layer 2 Virtual LAN using 802.1Q are

recognized as valid interface types
This commit is contained in:
Steven Kreuzer 2012-10-04 19:38:04 +00:00
parent 58f8b8de4d
commit c25d12484e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=305275
2 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= ptpd
DISTVERSION= 2.2.2
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= SF

View File

@ -0,0 +1,21 @@
--- dep/net.c.orig
+++ dep/net.c
@@ -322,10 +322,14 @@
return FALSE;
}
/* check that the interface TYPE is OK */
- if (((struct sockaddr_dl *)ifh->ifa_addr)->sdl_type != IFT_ETHER) {
- ERROR("\"%s\" is not an ethernet interface!\n", ifh->ifa_name);
- return FALSE;
- }
+ switch (((struct sockaddr_dl *)ifh->ifa_addr)->sdl_type) {
+ case IFT_ETHER:
+ case IFT_L2VLAN:
+ break;
+ default:
+ ERROR("\"%s\" is not an ethernet interface!\n", ifh->ifa_name);
+ return FALSE;
+ }
DBG("==> %s %s %s\n", ifv4->ifa_name,
inet_ntoa(((struct sockaddr_in *)ifv4->ifa_addr)->sin_addr),
ether_ntoa((struct ether_addr *)