rstp: Fix compiler type-punning error in rstp daemon
Subsystems (2)
PATCH 1/1 rstp: Fix compiler type-punning error in rstp daemon
Hey-
Was trying to build the rstp daemon today and got a type-punning error
in bridge_track.c. This patch fixes it up.
Signed-off-by Neil Horman <[email protected]>
bridge_track.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bridge_track.c +1 -1
@@ -599,7 +599,7 @@ void bridge_bpdu_rcv(int if_index, const unsigned char *data, int len)// TST(ntohs(*(uint16_t*)bpdu.body.message_age) // < ntohs(*(uint16_t*)bpdu.body.max_age), ); TST (memcmp (bpdu->body.bridge_id, &ifc->master->bridge_id,8 ) !=0 - || (ntohs (*(uint16_t *) bpdu->body.port_id) &0xfff ) != + || (ntohs ((uint16_t ) *bpdu->body.port_id) &0xfff ) != ifc->port_index,);break ;case BPDU_TOPO_CHANGE_TYPE :