freebsd-skq/sys/netgraph
John Polstra a514569e9a Fix a range checking bug in ng_int32_parse which affected 64-bit
machines.  The code formerly read:

    long val;
    if (val < (long)-0x80000000 || ...)
            return EINVAL;

The constant 0x80000000 has type unsigned int.  The unary `-'
operator does not change the type (or the value, in this case).
Therefore the promotion to long is done by 0-extension, giving
0x0000000080000000 instead of the desired 0xffffffff80000000.  I
got rid of the `-' and changed the cast to (int32_t) to give proper
sign-extension on all architectures and to better reflect the fact
that we are range-checking a 32-bit value.

This commit also makes the analogous changes to ng_int{8,16}_parse
for consistency.

MFC after:	3 days
2001-05-19 19:36:32 +00:00
..
netgraph.h Catch up to header include changes: 2001-03-28 09:17:56 +00:00
ng_async.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_async.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_base.c netgraph.h: 2001-03-10 16:31:00 +00:00
ng_bpf.c Fix cut and paste error in a comment. 2001-01-30 07:58:30 +00:00
ng_bpf.h Fix cut and paste error in a comment. 2001-01-30 07:58:30 +00:00
ng_bridge.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_bridge.h New netgraph node type for Ethernet bridging. 2000-09-01 01:37:13 +00:00
ng_cisco.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_cisco.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_echo.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_echo.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_eiface.c Allow a changed MAC address to show up in ifconfig by changing it 2001-02-26 09:31:54 +00:00
ng_eiface.h slight cleanups during testing. 2001-02-25 16:49:04 +00:00
ng_ether.c Implement direct support for semipersistant nodes. 2001-01-30 20:51:52 +00:00
ng_ether.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_frame_relay.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_frame_relay.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_hole.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_hole.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_iface.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_iface.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_ksocket.c Fix an erroneous comment and two style(9) bugs. 2001-02-16 17:37:31 +00:00
ng_ksocket.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_lmi.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_lmi.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_message.h Clean up reference counting with relation to queued packets and the worklist, 2001-02-01 20:51:23 +00:00
ng_mppc.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_mppc.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_one2many.c Implement direct support for semipersistant nodes. 2001-01-30 20:51:52 +00:00
ng_one2many.h Add a new distribution algorythm to the 'one2many' node type. 2001-01-28 15:37:06 +00:00
ng_parse.c Fix a range checking bug in ng_int32_parse which affected 64-bit 2001-05-19 19:36:32 +00:00
ng_parse.h Go back to using data_len in struct ngpppoe_init_data after discussions 2000-11-16 23:14:53 +00:00
ng_ppp.c Fix some memory leaks 2001-01-10 07:13:58 +00:00
ng_ppp.h More complete fix for multi-link sequence number handling bugs. 2000-10-06 23:42:02 +00:00
ng_pppoe.c Shuffle sysctls a bit (thankyou whoever made them dynamic for modules) 2001-02-23 16:34:22 +00:00
ng_pppoe.h Shuffle sysctls a bit (thankyou whoever made them dynamic for modules) 2001-02-23 16:34:22 +00:00
ng_pptpgre.c Don't reference a node after we dropped a reference to it 2001-04-11 22:04:47 +00:00
ng_pptpgre.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_rfc1490.c Missing FREE(). 2001-01-09 00:49:31 +00:00
ng_rfc1490.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_sample.c Make the sample netgraph node compileable again. 2001-02-25 05:36:25 +00:00
ng_sample.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_socket.c Shuffle sysctls a bit (thankyou whoever made them dynamic for modules) 2001-02-23 16:34:22 +00:00
ng_socket.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_socketvar.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_split.c Add a 'splitter' node to separate a bidirectional 2001-02-22 17:14:36 +00:00
ng_split.h Add a 'splitter' node to separate a bidirectional 2001-02-22 17:14:36 +00:00
ng_tee.c Swap egress hooks for packets entering from the monitor hooks. 2001-01-26 11:35:36 +00:00
ng_tee.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_tty.c Remove unneeded includes in the i386 case. 2001-05-15 23:16:18 +00:00
ng_tty.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_UI.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_UI.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
ng_vjc.c Part 2 of the netgraph rewrite. 2001-01-08 05:34:06 +00:00
ng_vjc.h Since neither archie nor I work at Whistle any more, change our email 2000-10-24 17:32:45 +00:00
NOTES Rewrite of netgraph to start getting ready for SMP. 2001-01-06 00:46:47 +00:00