mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 16:20:08 +00:00
bgpd: bgp_packet_set_size int to void
stream size is never checked anywhere in the code, just convert to void. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
5c24a442d9
commit
65baedcade
@ -106,17 +106,14 @@ int bgp_packet_set_marker(struct stream *s, uint8_t type)
|
|||||||
* Size field is set to the size of the stream passed.
|
* Size field is set to the size of the stream passed.
|
||||||
*
|
*
|
||||||
* @param s the stream containing the packet
|
* @param s the stream containing the packet
|
||||||
* @return the size of the stream
|
|
||||||
*/
|
*/
|
||||||
int bgp_packet_set_size(struct stream *s)
|
void bgp_packet_set_size(struct stream *s)
|
||||||
{
|
{
|
||||||
int cp;
|
int cp;
|
||||||
|
|
||||||
/* Preserve current pointer. */
|
/* Preserve current pointer. */
|
||||||
cp = stream_get_endp(s);
|
cp = stream_get_endp(s);
|
||||||
stream_putw_at(s, BGP_MARKER_SIZE, cp);
|
stream_putw_at(s, BGP_MARKER_SIZE, cp);
|
||||||
|
|
||||||
return cp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -561,7 +558,7 @@ void bgp_keepalive_send(struct peer *peer)
|
|||||||
bgp_packet_set_marker(s, BGP_MSG_KEEPALIVE);
|
bgp_packet_set_marker(s, BGP_MSG_KEEPALIVE);
|
||||||
|
|
||||||
/* Set packet size. */
|
/* Set packet size. */
|
||||||
(void)bgp_packet_set_size(s);
|
bgp_packet_set_size(s);
|
||||||
|
|
||||||
/* Dump packet if debug option is set. */
|
/* Dump packet if debug option is set. */
|
||||||
/* bgp_packet_dump (s); */
|
/* bgp_packet_dump (s); */
|
||||||
@ -626,7 +623,7 @@ void bgp_open_send(struct peer *peer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set BGP packet length. */
|
/* Set BGP packet length. */
|
||||||
(void)bgp_packet_set_size(s);
|
bgp_packet_set_size(s);
|
||||||
|
|
||||||
if (bgp_debug_neighbor_events(peer))
|
if (bgp_debug_neighbor_events(peer))
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
@ -953,7 +950,7 @@ void bgp_route_refresh_send(struct peer *peer, afi_t afi, safi_t safi,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set packet size. */
|
/* Set packet size. */
|
||||||
(void)bgp_packet_set_size(s);
|
bgp_packet_set_size(s);
|
||||||
|
|
||||||
if (bgp_debug_neighbor_events(peer)) {
|
if (bgp_debug_neighbor_events(peer)) {
|
||||||
if (!orf_refresh)
|
if (!orf_refresh)
|
||||||
@ -1011,7 +1008,7 @@ void bgp_capability_send(struct peer *peer, afi_t afi, safi_t safi,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set packet size. */
|
/* Set packet size. */
|
||||||
(void)bgp_packet_set_size(s);
|
bgp_packet_set_size(s);
|
||||||
|
|
||||||
/* Add packet to the peer. */
|
/* Add packet to the peer. */
|
||||||
bgp_packet_add(peer, s);
|
bgp_packet_add(peer, s);
|
||||||
|
@ -77,7 +77,7 @@ extern void bgp_update_implicit_eors(struct peer *);
|
|||||||
extern void bgp_check_update_delay(struct bgp *);
|
extern void bgp_check_update_delay(struct bgp *);
|
||||||
|
|
||||||
extern int bgp_packet_set_marker(struct stream *s, uint8_t type);
|
extern int bgp_packet_set_marker(struct stream *s, uint8_t type);
|
||||||
extern int bgp_packet_set_size(struct stream *s);
|
extern void bgp_packet_set_size(struct stream *s);
|
||||||
|
|
||||||
extern int bgp_generate_updgrp_packets(struct thread *);
|
extern int bgp_generate_updgrp_packets(struct thread *);
|
||||||
extern int bgp_process_packet(struct thread *);
|
extern int bgp_process_packet(struct thread *);
|
||||||
|
Loading…
Reference in New Issue
Block a user