diff options
author | luigi <luigi@FreeBSD.org> | 2001-01-26 19:43:54 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2001-01-26 19:43:54 +0000 |
commit | 3366175318f39df4fad7fff3569d1ce94a1c16cb (patch) | |
tree | b50452f6921c44fbc21aa753daf19479e1735bb1 /sys/netinet | |
parent | f61060516f3f31eac270534cc483d743ad040ca2 (diff) | |
download | FreeBSD-src-3366175318f39df4fad7fff3569d1ce94a1c16cb.zip FreeBSD-src-3366175318f39df4fad7fff3569d1ce94a1c16cb.tar.gz |
Minor cleanups after yesterday's patch.
The code (bridging and dummynet) actually worked fine!
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_dummynet.c | 6 | ||||
-rw-r--r-- | sys/netinet/ip_fw.c | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 366d447..908c064 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -442,7 +442,7 @@ transmit_event(struct dn_pipe *pipe) /* * same as ether_input, make eh be a pointer into the mbuf */ - eh = (void *)pkt->dn_m->m_data ; + eh = mtod(pkt->dn_m, struct ether_header *); m_adj(pkt->dn_m, ETHER_HDR_LEN); /* * bdg_forward() wants a pointer to the pseudo-mbuf-header, but @@ -627,7 +627,6 @@ ready_event_wfq(struct dn_pipe *p) if (blh->elements > 0) p->V = MAX64 ( p->V, blh->p[0].key ); /* move from not_eligible_heap to scheduler_heap */ - neh = &(p->not_eligible_heap) ; while (neh->elements > 0 && DN_KEY_LEQ(neh->p[0].key, p->V) ) { struct dn_flow_queue *q = neh->p[0].object ; heap_extract(neh, NULL); @@ -655,7 +654,6 @@ ready_event_wfq(struct dn_pipe *p) p->V = 0 ; p->idle_heap.elements = 0 ; } - /* * If we are getting clocks from dummynet (not a real interface) and * If we are under credit, schedule the next ready event. @@ -1674,7 +1672,7 @@ delete_pipe(struct dn_pipe *p) pipe_remove_from_heap(&wfq_ready_heap, b); splx(s); free(b, M_IPFW); - } else { /* this is a dummynet queue (dn_flow_set) */ + } else { /* this is a WF2Q queue (dn_flow_set) */ struct dn_flow_set *a, *b; /* locate set */ diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index 0b86c74..5e3cc1c 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -16,7 +16,6 @@ * $FreeBSD$ */ -#define STATEFUL 1 #define DEB(x) #define DDB(x) x @@ -986,9 +985,9 @@ ip_fw_chk(struct ip **pip, int hlen, proto = ip->ip_p; src_ip = ip->ip_src; dst_ip = ip->ip_dst; - if (0 && BRIDGED) { - offset = (NTOHS(ip->ip_off) & IP_OFFMASK); - ip_len = NTOHS(ip->ip_len); + if (0 && BRIDGED) { /* not yet... */ + offset = (ntohs(ip->ip_off) & IP_OFFMASK); + ip_len = ntohs(ip->ip_len); } else { offset = (ip->ip_off & IP_OFFMASK); ip_len = ip->ip_len; |