diff options
Diffstat (limited to 'isisd/isis_network.c')
-rw-r--r-- | isisd/isis_network.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/isisd/isis_network.c b/isisd/isis_network.c index a0df32e3..2e901f1a 100644 --- a/isisd/isis_network.c +++ b/isisd/isis_network.c @@ -422,7 +422,6 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa) /* then we lose the LLC */ memcpy (STREAM_DATA (circuit->rcv_stream), sock_buff + LLC_LEN, bytesread - LLC_LEN); - circuit->rcv_stream->putp = bytesread - LLC_LEN; circuit->rcv_stream->endp = bytesread - LLC_LEN; memcpy (ssnpa, &s_addr.sll_addr, s_addr.sll_halen); @@ -453,7 +452,6 @@ isis_recv_pdu_p2p (struct isis_circuit *circuit, u_char * ssnpa) return ISIS_WARNING; } - circuit->rcv_stream->putp = bytesread; circuit->rcv_stream->endp = bytesread; /* If we don't have protocol type 0x00FE which is @@ -503,7 +501,7 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level) /* now we can send this */ written = sendto (circuit->fd, sock_buff, - circuit->snd_stream->putp + LLC_LEN, 0, + stream_get_endp(circuit->snd_stream) + LLC_LEN, 0, (struct sockaddr *) &sa, sizeof (struct sockaddr_ll)); return ISIS_OK; @@ -531,7 +529,8 @@ isis_send_pdu_p2p (struct isis_circuit *circuit, int level) /* lets try correcting the protocol */ sa.sll_protocol = htons (0x00FE); written = sendto (circuit->fd, circuit->snd_stream->data, - circuit->snd_stream->putp, 0, (struct sockaddr *) &sa, + stream_get_endp (circuit->snd_stream), 0, + (struct sockaddr *) &sa, sizeof (struct sockaddr_ll)); return ISIS_OK; @@ -576,7 +575,6 @@ isis_recv_pdu_bcast (struct isis_circuit *circuit, u_char * ssnpa) memcpy (STREAM_DATA (circuit->rcv_stream), readbuff + offset, bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN); - circuit->rcv_stream->putp = bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN; circuit->rcv_stream->endp = bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN; circuit->rcv_stream->getp = 0; @@ -603,7 +601,6 @@ isis_recv_pdu_p2p (struct isis_circuit *circuit, u_char * ssnpa) return ISIS_WARNING; } - circuit->rcv_stream->putp = bytesread; circuit->rcv_stream->endp = bytesread; return ISIS_OK; @@ -641,7 +638,8 @@ isis_send_pdu_bcast (struct isis_circuit *circuit, int level) /* now we can send this */ written = write (circuit->fd, sock_buff, - circuit->snd_stream->putp + LLC_LEN + ETHER_HDR_LEN); + stream_get_endp (circuit->snd_stream) + + LLC_LEN + ETHER_HDR_LEN); return ISIS_OK; } |