diff options
-rw-r--r-- | usr.sbin/ripd/auth.c | 10 | ||||
-rw-r--r-- | usr.sbin/ripd/message.c | 11 | ||||
-rw-r--r-- | usr.sbin/ripd/packet.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/ripe.h | 10 |
4 files changed, 17 insertions, 18 deletions
diff --git a/usr.sbin/ripd/auth.c b/usr.sbin/ripd/auth.c index ec58fbe42bf..b8c739b0d80 100644 --- a/usr.sbin/ripd/auth.c +++ b/usr.sbin/ripd/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.8 2007/10/18 17:00:59 deraadt Exp $ */ +/* $OpenBSD: auth.c,v 1.9 2007/10/24 20:52:50 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -69,8 +69,8 @@ auth_trailer_header_gen(struct buf *buf) /* XXX add the support for key lifetime and rollover */ int -auth_validate(char **buf, u_int16_t *len, struct iface *iface, struct nbr *nbr, - struct nbr_failed *nbr_failed, u_int32_t *crypt_seq_num) +auth_validate(u_int8_t **buf, u_int16_t *len, struct iface *iface, + struct nbr *nbr, struct nbr_failed *nbr_failed, u_int32_t *crypt_seq_num) { MD5_CTX hash; u_int8_t digest[MD5_DIGEST_LENGTH]; @@ -79,8 +79,8 @@ auth_validate(char **buf, u_int16_t *len, struct iface *iface, struct nbr *nbr, struct rip_auth *auth_head; struct md5_auth *a; struct auth_md *md; - char *auth_data; - char *b = *buf; + u_int8_t *auth_data; + u_int8_t *b = *buf; *buf += RIP_HDR_LEN; *len -= RIP_HDR_LEN; diff --git a/usr.sbin/ripd/message.c b/usr.sbin/ripd/message.c index b73cc6d81a0..091d162d640 100644 --- a/usr.sbin/ripd/message.c +++ b/usr.sbin/ripd/message.c @@ -1,4 +1,4 @@ -/* $OpenBSD: message.c,v 1.8 2007/10/18 17:00:59 deraadt Exp $ */ +/* $OpenBSD: message.c,v 1.9 2007/10/24 20:52:50 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -311,7 +311,7 @@ free: } void -recv_request(struct iface *i, struct nbr *nbr, char *buf, u_int16_t len) +recv_request(struct iface *i, struct nbr *nbr, u_int8_t *buf, u_int16_t len) { struct rip_entry *e; struct rip_route rr; @@ -363,7 +363,7 @@ recv_request(struct iface *i, struct nbr *nbr, char *buf, u_int16_t len) rr.ifindex = i->ifindex; ripe_imsg_compose_rde(IMSG_ROUTE_REQUEST, nbr->peerid, - 0, (void *)&rr, sizeof(rr)); + 0, &rr, sizeof(rr)); e++; } @@ -373,7 +373,7 @@ recv_request(struct iface *i, struct nbr *nbr, char *buf, u_int16_t len) } void -recv_response(struct iface *i, struct nbr *nbr, char *buf, u_int16_t len) +recv_response(struct iface *i, struct nbr *nbr, u_int8_t *buf, u_int16_t len) { struct rip_route r; struct rip_entry *e; @@ -423,8 +423,7 @@ recv_response(struct iface *i, struct nbr *nbr, char *buf, u_int16_t len) r.metric = ntohl(e->metric); r.ifindex = i->ifindex; - ripe_imsg_compose_rde(IMSG_ROUTE_FEED, 0, 0, (void *)&r, - sizeof(r)); + ripe_imsg_compose_rde(IMSG_ROUTE_FEED, 0, 0, &r, sizeof(r)); e++; } diff --git a/usr.sbin/ripd/packet.c b/usr.sbin/ripd/packet.c index bfa3d9c49fd..b2f6e0d43a6 100644 --- a/usr.sbin/ripd/packet.c +++ b/usr.sbin/ripd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.6 2007/03/27 20:19:04 michele Exp $ */ +/* $OpenBSD: packet.c,v 1.7 2007/10/24 20:52:50 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -90,7 +90,7 @@ recv_packet(int fd, short event, void *bula) struct iface *iface; struct rip_hdr *rip_hdr; struct nbr *nbr; - char *buf; + u_int8_t *buf; ssize_t r; u_int16_t len, srcport; u_int32_t auth_crypt_num = 0; diff --git a/usr.sbin/ripd/ripe.h b/usr.sbin/ripd/ripe.h index 76a3a619b38..30487d975ec 100644 --- a/usr.sbin/ripd/ripe.h +++ b/usr.sbin/ripd/ripe.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ripe.h,v 1.7 2007/10/18 09:47:57 claudio Exp $ */ +/* $OpenBSD: ripe.h,v 1.8 2007/10/24 20:52:50 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -27,7 +27,7 @@ #include <netinet/ip.h> TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conns; -char *pkt_ptr; +u_int8_t *pkt_ptr; /* neighbor events */ enum nbr_event { @@ -96,8 +96,8 @@ int if_leave_group(struct iface *, struct in_addr *); struct ctl_iface *if_to_ctl(struct iface *); /* message.c */ -void recv_request(struct iface *, struct nbr *, char *, u_int16_t); -void recv_response(struct iface *, struct nbr *, char *, u_int16_t); +void recv_request(struct iface *, struct nbr *, u_int8_t *, u_int16_t); +void recv_response(struct iface *, struct nbr *, u_int8_t *, u_int16_t); void add_entry(struct packet_head *, struct rip_route *); void clear_list(struct packet_head *); int send_triggered_update(struct iface *, struct rip_route *); @@ -117,7 +117,7 @@ void ripe_iface_ctl(struct ctl_conn *, unsigned int); void ripe_nbr_ctl(struct ctl_conn *); /* auth.c */ -int auth_validate(char **, u_int16_t *, struct iface *, struct nbr *, +int auth_validate(u_int8_t **, u_int16_t *, struct iface *, struct nbr *, struct nbr_failed *, u_int32_t *); int auth_gen(struct buf *, struct iface *); int auth_add_trailer(struct buf *, struct iface *); |