From 8a676ab2d88022aea68a2a31ac83dfe25d64e175 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 10 Oct 2010 15:53:37 +0200 Subject: Robustness fixes (and some callback invocation) by Luke Howard. * lib/packet.c (_packet_create): Set packet identity properly. (_do_send): Return an int. (_do_send): Don't ignore rad_encode() errors. (_do_send): Do invoke rad_sign(). (_event_cb): Invoke callbacks. (_event_cb): Honour _do_send() return code. (_read_cb): Check packet (by invoking rad_packet_ok()). (_read_cb): Don't ignore rad_decode() errors. (_read_cb): Invoke callbacks. --- lib/include/radsec/radsec-impl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/include/radsec/radsec-impl.h') diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h index b46bc47..d2ea095 100644 --- a/lib/include/radsec/radsec-impl.h +++ b/lib/include/radsec/radsec-impl.h @@ -63,9 +63,11 @@ struct rs_connection { enum rs_conn_type type; struct rs_credentials transport_credentials; struct rs_conn_callbacks callbacks; + void *user_data; struct rs_peer *peers; struct rs_peer *active_peer; struct rs_error *err; + int nextid; }; struct rs_packet { -- cgit v1.1 From ff55882798b6c482faec920d30a4ffdc10b306f7 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 11 Oct 2010 10:41:58 +0200 Subject: Request object implementation and bug fixes by Luke Howard. --- lib/include/radsec/radsec-impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/include/radsec/radsec-impl.h') diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h index d2ea095..3ce01d0 100644 --- a/lib/include/radsec/radsec-impl.h +++ b/lib/include/radsec/radsec-impl.h @@ -68,6 +68,7 @@ struct rs_connection { struct rs_peer *active_peer; struct rs_error *err; int nextid; + int user_dispatch_flag : 1; /* User does the dispatching. */ }; struct rs_packet { -- cgit v1.1 From 06936d1f263c456017e20ea6c74d2756e1e30fcc Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 9 Oct 2010 11:54:37 +0200 Subject: Have rad_decode() verify responses. --- lib/include/radsec/radsec-impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/include/radsec/radsec-impl.h') diff --git a/lib/include/radsec/radsec-impl.h b/lib/include/radsec/radsec-impl.h index 3ce01d0..6e5ee83 100644 --- a/lib/include/radsec/radsec-impl.h +++ b/lib/include/radsec/radsec-impl.h @@ -76,6 +76,7 @@ struct rs_packet { char hdr_read_flag; uint8_t hdr[4]; RADIUS_PACKET *rpkt; + struct rs_packet *original; }; struct rs_attr { -- cgit v1.1