瀏覽代碼

Always include code for sending multicast packets.

tags/v0.9.3
Michael Brown 19 年之前
父節點
當前提交
cbed5ed9ad
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0
    4
      src/core/nic.c

+ 0
- 4
src/core/nic.c 查看文件

@@ -424,7 +424,6 @@ int ip_transmit(int len, const void *buf)
424 424
 	destip = ip->dest.s_addr;
425 425
 	if (destip == IP_BROADCAST) {
426 426
 		eth_transmit(broadcast, ETH_P_IP, len, buf);
427
-#ifdef MULTICAST_LEVEL1 
428 427
 	} else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) {
429 428
 		unsigned char multicast[6];
430 429
 		unsigned long hdestip;
@@ -436,7 +435,6 @@ int ip_transmit(int len, const void *buf)
436 435
 		multicast[4] = (hdestip >> 8) & 0xff;
437 436
 		multicast[5] = hdestip & 0xff;
438 437
 		eth_transmit(multicast, ETH_P_IP, len, buf);
439
-#endif
440 438
 	} else {
441 439
 		if (((destip & netmask) !=
442 440
 			(arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) &&
@@ -1152,10 +1150,8 @@ RFC2131_SLEEP_INTERVAL - sleep for expotentially longer times (base << exp) +- 1
1152 1150
 long rfc2131_sleep_interval(long base, int exp)
1153 1151
 {
1154 1152
 	unsigned long tmo;
1155
-#ifdef BACKOFF_LIMIT
1156 1153
 	if (exp > BACKOFF_LIMIT)
1157 1154
 		exp = BACKOFF_LIMIT;
1158
-#endif
1159 1155
 	tmo = (base << exp) + (TICKS_PER_SEC - (random()/TWO_SECOND_DIVISOR));
1160 1156
 	return tmo;
1161 1157
 }

Loading…
取消
儲存