Changeset 25312 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
- Timestamp:
- Dec 10, 2009 5:36:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
r25302 r25312 599 599 PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvData; 600 600 AssertPtrReturnVoid(pThis); 601 AssertPtrReturnVoid(pMsg); 601 602 602 603 /* … … 630 631 LogRel((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG failed. rc=%d\n", rc)); 631 632 632 vboxNetFltRelease(pThis, true /* fBusy */); 633 vboxNetFltRelease(pThis, true /* fBusy */); 633 634 freemsgchain(pMsg); 634 635 … … 648 649 { 649 650 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 650 651 651 652 /* 652 653 * Open the underlying interface (lower MAC) and get it's handle. … … 666 667 AssertCompile(sizeof(RTMAC) == ETHERADDRL); 667 668 mac_unicast_primary_get(pThis->u.s.hInterface, (uint8_t *)&pThis->u.s.Mac.au8); 668 669 670 LogFlow((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface MAC address of %s is %.*Rhxs\n", pThis->szName, 671 sizeof(pThis->u.s.Mac), &pThis->u.s.Mac)); 672 669 673 /** @todo Obtain the MTU size using mac_sdu_get() */ 670 674 /** @todo Obtain capabilities (hardware checksum etc.) using mac_capab_get() */ … … 686 690 */ 687 691 mac_diag_t MacDiag; 688 rc = mac_unicast_add_set_rx(pThis->u.s.hClient, NULL /* MAC Address */, MAC_UNICAST_PRIMARY, 692 rc = mac_unicast_add_set_rx(pThis->u.s.hClient, NULL /* MAC Address */, 693 MAC_UNICAST_PRIMARY | MAC_UNICAST_STRIP_DISABLE | 694 MAC_UNICAST_DISABLE_TX_VID_CHECK | MAC_UNICAST_NODUPCHECK, 689 695 &pThis->u.s.hUnicast, 0 /* VLAN id */, &MacDiag, NULL /* pfnRecv */, pThis); 690 696 if (!rc) … … 696 702 LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface failed to set client MAC address over link '%s' rc=%d\n", 697 703 pThis->szName, rc)); 704 705 mac_client_close(pThis->u.s.hClient, 0 /* fFlags */); 706 pThis->u.s.hClient = NULL; 698 707 } 699 708 else … … 744 753 if (pThis->u.s.hClient) 745 754 { 746 mac_unicast_remove(pThis->u.s.hClient, pThis->u.s.hUnicast); 747 pThis->u.s.hUnicast = NULL; 755 if (pThis->u.s.hUnicast) 756 { 757 mac_unicast_remove(pThis->u.s.hClient, pThis->u.s.hUnicast); 758 pThis->u.s.hUnicast = NULL; 759 } 748 760 749 761 mac_rx_clear(pThis->u.s.hClient); … … 756 768 { 757 769 mac_close(pThis->u.s.hInterface); 758 pThis->u.s.hInterface = NULL; 770 pThis->u.s.hInterface = NULL; 759 771 } 760 772 } … … 798 810 { 799 811 int rc = mac_promisc_add(pThis->u.s.hClient, MAC_CLIENT_PROMISC_ALL, vboxNetFltSolarisRecv, pThis, &pThis->u.s.hPromiscuous, 800 /* MAC_PROMISC_FLAGS_NO_TX_LOOP */ 0);812 MAC_PROMISC_FLAGS_NO_TX_LOOP); 801 813 if (rc) 802 814 LogRel((DEVICE_NAME ":vboxNetFltPortOsSetActive cannot enable promiscuous mode for '%s' rc=%d\n", pThis->szName, rc)); … … 880 892 { 881 893 LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p cbData=%d\n", pThis, MBLKL(pMsg))); 882 mac_tx_cookie_t pXmitCookie = mac_tx(pThis->u.s.hClient, pMsg, 883 0 /* hint: no idea what this is */, 884 MAC_DROP_ON_NO_DESC, /* freemsg on failure */ 885 NULL /* return message */ 886 ); 887 if (!pXmitCookie) 888 return VINF_SUCCESS; 889 890 pMsg = NULL; 891 rc = VERR_NET_IO_ERROR; 892 LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit Xmit failed.\n")); 894 895 mac_tx(pThis->u.s.hClient, pMsg, 0 /* Hint */, MAC_DROP_ON_NO_DESC, NULL /* return message */); 896 return VINF_SUCCESS; 893 897 } 894 898 else
Note:
See TracChangeset
for help on using the changeset viewer.