[Swan-commit] Changes to ref refs/heads/master

Antony Antony antony at vault.libreswan.fi
Tue Apr 29 23:28:28 EEST 2014


New commits:
commit 26aa4b046d6584d9a92c1febe3b249a0bfbb7970
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Tue Apr 29 14:08:10 2014 -0400

    addresspool:
    - rel_lease_addr: mark variables only used for DBG code
    
    - simplify logging code
    
    - make unreference_addresspool consistent with reference_addresspool:
      both now require that the connection actually have an addresspool
    
    - add "extern" to the rest of the function declarations in addresspool.h

commit 70f14b6e26afdf8049583cbbc1d03c1352885e6b
Merge: 0244c30 efcf0ea
Author: Antony Antony <antony at phenome.org>
Date:   Tue Apr 29 22:25:36 2014 +0200

    Merge branch 'addresspool-play'

commit 0244c3042901490f646fee585dcc706c4a9fd7d3
Author: Antony Antony <antony at phenome.org>
Date:   Sat Apr 26 21:33:36 2014 +0200

    - addresspool: reference count an IPv4 address lease.
    - revive/re-lease it to the same id if uniqueid is set.

commit efcf0ea0d71acbbdd6e44c088fc899e9d7bbc363
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 27 21:54:39 2014 +0200

    - fix typo bug in could_share_lease
    - reference count instantiated connection

commit d1093d1510a409f83b47dc8e8f4993bed87f8c1b
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sat Apr 26 23:36:04 2014 -0400

    Simplify addresspool
    
    - eliminate #includes <time.h>: no longer needed
    
    - eliminate #include <pthread.h>: threads not involved with addresspool
    
    - eliminate second #include "lswalloc.h": one is enough
    
    - eliminate #include "demux.h": not relevant
    
    - eliminate #include "packet.h": not relevant
    
    - eliminate #include "xauth.h": was only needed because
      get_addr_lease took a struct internal_address * parameter.
      Since it only knew how to deal with an ip_address field
      within that struct, this was pointless.
    
    - renamed struct_ip_pools field refcount to pool_refcount
      so it would easy to tell the difference between references to
      it and reference to struct lease's refcnt field.
      I'm sure that better names could be devised.
    
    - fixed and beefed up comments
    
    - renamed some functions to add clarity
    
    - added "could_share_lease(c)" abstraction and used it where
      appropriate.  Previously this single logical test was
      sometimes split within separate functions.
    
    - added MUST_USE_RESULT to free_lease_entry().  Any caller
      that doesn't use the result is surely breaking the lease
      linked list.
    
    - cut down some of the redundant and verbose logging
    
    - moved variables and code for logging into the DBG calls.
    
    - general simplification
    
    Untested.

commit 83fa9d263e08566d7f8aadf0aa1de49e626183cb
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sat Apr 26 20:31:51 2014 -0400

    more whitespace cleanup

commit 8919fc37c7754ef306f3cf4638a9331cf93c59fe
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sat Apr 26 20:05:45 2014 -0400

    get rid to trailing whitespace

commit 6883bc3c9d1afd26c8e99e00d8eaf877dcd75e27
Merge: ffb944e 11f73ec
Author: Antony Antony <antony at phenome.org>
Date:   Sat Apr 26 22:15:49 2014 +0200

    Merge branch 'master' into addresspool-play

commit ffb944e21e1be46b45cb77907332e2f97ee72cbd
Merge: deb6b6c 85d5746
Author: Antony Antony <antony at phenome.org>
Date:   Sat Apr 26 21:52:09 2014 +0200

    Merge branch 'master' into addresspool-play

commit deb6b6c789eff7333f8a920004cf5317c50ccbea
Author: Antony Antony <antony at phenome.org>
Date:   Sat Apr 26 21:33:36 2014 +0200

    - addresspool: reference count an IPv4 address lease.
    - revive/re-lease it to the same id if uniqueid is set.

commit 7d8044be5bca725f342a83c19cfc502056f25fbd
Merge: 5395188 ad34d4f
Author: Antony Antony <antony at phenome.org>
Date:   Wed Apr 23 23:38:07 2014 +0200

    Merge branch 'master' into addresspool-play

commit 5395188a9e9d13a7c7a20d370f90455ffb131d5e
Author: Antony Antony <antony at phenome.org>
Date:   Wed Apr 23 23:17:09 2014 +0200

    fix typo in ip_address_family

commit 4a811dba3bcd99b6d253bdd344a35a6a8eabf155
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Wed Apr 23 16:46:31 2014 -0400

    - rel_lease_addr now updates c->spd.that.has_lease
    - move struct end's has_lease adjacent to pool_range (they are related)
    - change get_internal_addresses:
      + rename parameter has_lease to got_lease (because that's what it signifies)
      + always set *got_lease, not just sometimes.  Makes dataflow clearer
    - replaced a memeq with a sameaddr: more appropriate use of abstractions

commit 6a02eed5cd0a9da6983de66413e4a6b5b938af90
Author: Antony Antony <antony at phenome.org>
Date:   Wed Apr 23 22:02:16 2014 +0200

    update the commet

commit 016b1d5dc8e63bde0ad7bced7e0094bde7b7d715
Author: Antony Antony <antony at phenome.org>
Date:   Wed Apr 23 21:51:36 2014 +0200

    don't need has_lease in whack only in end.
    set has_lease

commit 9883ee7c6530a043ff7f2a0a9441d429327c37c8
Author: Antony Antony <antony at phenome.org>
Date:   Wed Apr 23 21:35:48 2014 +0200

    add has_lease, set it when an address is leased from an addresspool

commit bd84412a2c6cd064209ca114554452b874f3168f
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Wed Apr 23 14:52:58 2014 -0400

    - Add ip_address_eq macro to compare two ip_address values for equality
    - revise ip_address_cmp to correctly produce the three-way result.
    - clarify with comments (should there be a man page?)
    - replace calls to ip_address_cmp with calls to ip_address_eq where appropriate.

commit f1c3b5eb88d300b26af92adc3c851599446d2beb
Merge: 434a7ba c7ea606
Author: Antony Antony <antony at phenome.org>
Date:   Wed Apr 23 20:57:37 2014 +0200

    Merge branch 'master' into addresspool-play

commit 434a7ba61d862581c3ca8f11778df73a5ead153e
Merge: a1f2ee1 8a711eb
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Mon Apr 21 12:15:04 2014 -0400

    Merge branch 'addresspool-play' of vault.libreswan.org:/srv/src/libreswan into addresspool-play

commit a1f2ee1d0d8f2482a6f7dcac6455b22c6fc18b00
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Mon Apr 21 12:14:35 2014 -0400

    ttorange:
    - remove tests for string lengths (these will be caught due to syntax errors)
    - remove test for NULL src (will be caught by segfault)
      (note: this is a program error, not a user error)
    - remove code for unsupported address families
    - improve error messages
    Regression tests may need revision.

commit 8a711eb3add7d3b753785e382fa0a41f5ed855ae
Author: Antony Antony <antony at phenome.org>
Date:   Mon Apr 21 17:51:59 2014 +0200

    coding style improvement.

commit 2b5dd897b0e498431e8b37c3af8b838fb22695cc
Author: Antony Antony <antony at phenome.org>
Date:   Mon Apr 21 17:41:59 2014 +0200

    cleanup remove unused variable.  free_lease_for_index  is in use now

commit 9b885ce5fedd280d90c51535aca6cd5407c1d668
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Mon Apr 21 11:08:02 2014 -0400

    rename COMPILE_UNUSED_THING => COMPILE_UNUSED_THINGS

commit 77e440f910de6fae32eeacf91eb73844d11959a2
Author: Antony Antony <antony at phenome.org>
Date:   Mon Apr 21 09:00:49 2014 +0200

    simplyfiy the addresspool range validation by improving ttorange

commit 1f804ef48f913d7dc9e92e32f9d561a161758e74
Merge: 886a6a0 4bf9747
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sun Apr 20 20:19:30 2014 -0400

    Merge branch 'addresspool-play' of vault.libreswan.org:/srv/src/libreswan into addresspool-play

commit 886a6a0fc7dd4aa610795b3af13ac0037bc503a4
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sun Apr 20 20:14:00 2014 -0400

    addresspool:
    
    - move definition of struct ip_pool from .h to .c:
      the type should be opaque to other modules
    
    - since connection.c can no longer log anything from within struct ip_pool,
      change unreference_addresspool to take over this logging
      (so it needs to be given the struct connection *)
    
    - unreference_addresspool now sets the connection's pool
      pointer to NULL: the connection no longer has a pool.
    
    - unreference_addresspool passerts that the reference count
      is sane.  Continuing with insanity makes no sense.
    
    - renamed "NEVER" to "COMPILE_UNUSED_THING" -- more accurate.

commit 4bf97479201a6180c36db685f734a5767cdfb677
Author: Antony Antony <antony at phenome.org>
Date:   Mon Apr 21 02:02:27 2014 +0200

    improve validation of addresspool in confread and whack

commit ab32304a5584615c242d714e7d686dc9a6adbdbc
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 23:19:34 2014 +0200

    initialize peer to zero in ikev1_decode_peer_id

commit 00818085a5a18a4ad59f1dd61a80ca2b5217a74e
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 18:13:00 2014 +0200

    fix  unreference_addresspool

commit 8895212de9db21f6090c7e34f54a1f08e6db7ec6
Merge: ca51bf1 cb1d1e6
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 17:24:56 2014 +0200

    Merge branch 'master' into addresspool-play

commit ca51bf19879fd386e1e84c2dc8e5871a8583ec78
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 15:26:52 2014 +0200

    real fix the previous one was a git accident

commit c2047fa7fc34f3ac40ed851cfca04b37f4dfd89d
Merge: 3f476bf 4d248da
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 15:11:18 2014 +0200

    Merge branch 'addresspool-play' of vault.libreswan.org:/srv/src/libreswan into addresspool-play
    
    Conflicts:
    	lib/libipsecconf/confread.c
    	programs/pluto/addresspool.c
    	programs/pluto/addresspool.h
    	programs/pluto/connections.c

commit 3f476bf7f12457ee7fadf68752214a608d344796
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 15:02:26 2014 +0200

    use the unused code.

commit c08fe7e01a08a2dc1f525b70d5960e2f8717e10d
Author: Antony Antony <antony at phenome.org>
Date:   Thu Apr 17 22:05:55 2014 +0200

    fix addresspool range check

commit c3e61bcbbde023e3069308d15014f394cd7af3d8
Author: Antony Antony <antony at phenome.org>
Date:   Thu Apr 17 20:50:43 2014 +0200

    address pool validations on the end

commit 757203f5b88412bf21a1d2b1fd1e94b4a7bf106e
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Tue Mar 18 18:08:31 2014 -0400

    Suggestions for addresspool changes
    
    - unused functions are now #ifdef NEVER.
      They can be checked by the compiler if NEVER is defined.
    
    - new comments (need to be checked).  Comments with ??? indicate
      things not understood.
    
    - removed __LINE__ uses from logging.  Each message is unique so this
      added nothing.  Furthermore it would create uninteresting differences
      in output logs making testing more difficult.
    
    - changed calls to pfreeany to pfree where this was obviously correct.
    
    - deleted unused struct ip_pool_old
    
    - moved struct lease_addr and struct ip_pool from addresspool.h to addresspool.h
      These should be opaque types outside addresspool.c.
    
    - moved pluto_pools from addresspool.h to addresspool.h
      This made a slight change to install_addresspool necessary.
    
    - tried to clarify use of struct lease_addr's "ends" field.
      Renamed it "ended".  Reworked assignments of boolean constants
      to this field.  Added a passert to enforce an unstated assumption
      that the current time_t could not be 0.
    
    - renamed struct ip_pools "lease" field to "leases" since it is the
      head of a list of leases.
    
    - several while-loops changed to for-loops to clarify their structure.
      To make the code more understandable, tried to use the same idiom
      whenever reasonable.  Simplified loops that were meant to remove
      an item from a list.
    
    - where easy, reduced the scope of local variables.
    
    - rel_lease_entry, free_lease: changed the name of the lease index
      parameter from "lease" to i: a lease index is not a lease!
    
    - rel_lease_entry??
    
    - free_lease renamed to free_lease_for_index because that's what it
      does.  "free_lease" suggests a function that takes a lease argument.
    
    - made rel_lease_addr return bool, not int (reflects actual code)
    
    - changed unreference_addresspool to properly remove the addresspool
      from the list of pools.
    
    - The code in connections.c that called free_addresspool_entry ignored
      the return value and so would have broken the addresspool list.
      Besides, it really should have called unreference_addresspool since
      there might be other references to this pool.  Changed to use
      unreference_addresspool.
    
    - free_addresspool didn't unlink the pool from the pluto_pools list.
      Fixed.
    
    - free_addresspool_entry had a number of problems.  Deleted.  Use
      other functions in its place (free_addresspool,
      unreference_addresspool).
    
      + free_addresspool_entry was misnamed.  If the pool had a
        refcount greater than one, it didn't actually delete the pool.
        A better name would have been unreference_addresspool, but we
        already have one of them.
    
      + free_addresspool_entry's return result was hard for some callers
        honour.  It was supposed to overwrite the list's pointer to the
        old pool (Either in preceding pool's next pointer, or the list
        head).  Caller's like the one in connection.c had no easy way of
        doing that.
    
      + free_addresspool_entry, even when it didn't delete the entry, did
        unlink it from the pools list (assuming that the caller properly
        used the return value (see above)).  This is not correct.
    
      + free_addresspool_entry had a serious bug.  If the pool had a
        refcount greater than one, it didn't actually delete the pool
        (contrary to what the name suggests).  Furthermore, even if it
        didn't delete the entry, it did unlink it from the pools list
        (assuming that the caller properly used the return value (see
        above)).
    
    - reference_addresspool's result was never used.  Change it to return
      void.
    
    - partial rewrite of rel_lease_addr:
    
      + rename abuf* to make their contents manifest
    
      + use properties of unsigned arithmetic to make range
        comparison simpler.
    
    - changes to get_addr_lease trying to make it more understandable.
    
    - changes to find_addresspool trying to make it more understandable.
      Now detect inexact range overlaps, which should be banned.
    
    - changes to install_addresspool trying to make it more
      understandable.
    
    - Added more checking to install_addresspool

commit 4d248dad7fa334b3ecb9bbf234acc6367544e4a7
Author: Antony Antony <antony at phenome.org>
Date:   Sun Apr 20 00:10:48 2014 +0200

    resolve the qustions dhr raised.

commit 4bf88be9ead521057907acd2d6038b1d8ce26fb7
Author: Antony Antony <antony at phenome.org>
Date:   Sat Apr 19 14:43:04 2014 +0200

    address commit 480ccb2e1

commit 716a91ab46922cebae7665b9cc52c8d37230a09a
Author: Antony Antony <antony at phenome.org>
Date:   Thu Apr 17 22:05:55 2014 +0200

    fix addresspool range check

commit 3ca3f28ab738809917ed362832e962e7eb18bec0
Merge: 777480b 1798c1d
Author: Antony Antony <antony at phenome.org>
Date:   Thu Apr 17 20:51:44 2014 +0200

    Merge branch 'addresspool-play' of vault.libreswan.org:/srv/src/libreswan into addresspool-play

commit 777480b1b7027e7a7cad9e6c3ec70d37bb417671
Author: Antony Antony <antony at phenome.org>
Date:   Thu Apr 17 20:50:43 2014 +0200

    address pool validations on the end

commit 480ccb2e1d5b83ba49faf8547ded7af9a99f2ecb
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Tue Mar 18 18:08:31 2014 -0400

    Suggestions for addresspool changes
    
    - unused functions are now #ifdef NEVER.
      They can be checked by the compiler if NEVER is defined.
    
    - new comments (need to be checked).  Comments with ??? indicate
      things not understood.
    
    - removed __LINE__ uses from logging.  Each message is unique so this
      added nothing.  Furthermore it would create uninteresting differences
      in output logs making testing more difficult.
    
    - changed calls to pfreeany to pfree where this was obviously correct.
    
    - deleted unused struct ip_pool_old
    
    - moved struct lease_addr and struct ip_pool from addresspool.h to addresspool.h
      These should be opaque types outside addresspool.c.
    
    - moved pluto_pools from addresspool.h to addresspool.h
      This made a slight change to install_addresspool necessary.
    
    - tried to clarify use of struct lease_addr's "ends" field.
      Renamed it "ended".  Reworked assignments of boolean constants
      to this field.  Added a passert to enforce an unstated assumption
      that the current time_t could not be 0.
    
    - renamed struct ip_pools "lease" field to "leases" since it is the
      head of a list of leases.
    
    - several while-loops changed to for-loops to clarify their structure.
      To make the code more understandable, tried to use the same idiom
      whenever reasonable.  Simplified loops that were meant to remove
      an item from a list.
    
    - where easy, reduced the scope of local variables.
    
    - rel_lease_entry, free_lease: changed the name of the lease index
      parameter from "lease" to i: a lease index is not a lease!
    
    - rel_lease_entry??
    
    - free_lease renamed to free_lease_for_index because that's what it
      does.  "free_lease" suggests a function that takes a lease argument.
    
    - made rel_lease_addr return bool, not int (reflects actual code)
    
    - changed unreference_addresspool to properly remove the addresspool
      from the list of pools.
    
    - The code in connections.c that called free_addresspool_entry ignored
      the return value and so would have broken the addresspool list.
      Besides, it really should have called unreference_addresspool since
      there might be other references to this pool.  Changed to use
      unreference_addresspool.
    
    - free_addresspool didn't unlink the pool from the pluto_pools list.
      Fixed.
    
    - free_addresspool_entry had a number of problems.  Deleted.  Use
      other functions in its place (free_addresspool,
      unreference_addresspool).
    
      + free_addresspool_entry was misnamed.  If the pool had a
        refcount greater than one, it didn't actually delete the pool.
        A better name would have been unreference_addresspool, but we
        already have one of them.
    
      + free_addresspool_entry's return result was hard for some callers
        honour.  It was supposed to overwrite the list's pointer to the
        old pool (Either in preceding pool's next pointer, or the list
        head).  Caller's like the one in connection.c had no easy way of
        doing that.
    
      + free_addresspool_entry, even when it didn't delete the entry, did
        unlink it from the pools list (assuming that the caller properly
        used the return value (see above)).  This is not correct.
    
      + free_addresspool_entry had a serious bug.  If the pool had a
        refcount greater than one, it didn't actually delete the pool
        (contrary to what the name suggests).  Furthermore, even if it
        didn't delete the entry, it did unlink it from the pools list
        (assuming that the caller properly used the return value (see
        above)).
    
    - reference_addresspool's result was never used.  Change it to return
      void.
    
    - partial rewrite of rel_lease_addr:
    
      + rename abuf* to make their contents manifest
    
      + use properties of unsigned arithmetic to make range
        comparison simpler.
    
    - changes to get_addr_lease trying to make it more understandable.
    
    - changes to find_addresspool trying to make it more understandable.
      Now detect inexact range overlaps, which should be banned.
    
    - changes to install_addresspool trying to make it more
      understandable.
    
    - Added more checking to install_addresspool

commit 1798c1dcdcfdc0fc6dba198f2e7ca18f02942449
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Tue Mar 18 18:08:31 2014 -0400

    Suggestions for addresspool changes
    
    - unused functions are now #ifdef NEVER.
      They can be checked by the compiler if NEVER is defined.
    
    - new comments (need to be checked).  Comments with ??? indicate
      things not understood.
    
    - removed __LINE__ uses from logging.  Each message is unique so this
      added nothing.  Furthermore it would create uninteresting differences
      in output logs making testing more difficult.
    
    - changed calls to pfreeany to pfree where this was obviously correct.
    
    - deleted unused struct ip_pool_old
    
    - moved struct lease_addr and struct ip_pool from addresspool.h to addresspool.h
      These should be opaque types outside addresspool.c.
    
    - moved pluto_pools from addresspool.h to addresspool.h
      This made a slight change to install_addresspool necessary.
    
    - tried to clarify use of struct lease_addr's "ends" field.
      Renamed it "ended".  Reworked assignments of boolean constants
      to this field.  Added a passert to enforce an unstated assumption
      that the current time_t could not be 0.
    
    - renamed struct ip_pools "lease" field to "leases" since it is the
      head of a list of leases.
    
    - several while-loops changed to for-loops to clarify their structure.
      To make the code more understandable, tried to use the same idiom
      whenever reasonable.  Simplified loops that were meant to remove
      an item from a list.
    
    - where easy, reduced the scope of local variables.
    
    - rel_lease_entry, free_lease: changed the name of the lease index
      parameter from "lease" to i: a lease index is not a lease!
    
    - rel_lease_entry??
    
    - free_lease renamed to free_lease_for_index because that's what it
      does.  "free_lease" suggests a function that takes a lease argument.
    
    - made rel_lease_addr return bool, not int (reflects actual code)
    
    - changed unreference_addresspool to properly remove the addresspool
      from the list of pools.
    
    - The code in connections.c that called free_addresspool_entry ignored
      the return value and so would have broken the addresspool list.
      Besides, it really should have called unreference_addresspool since
      there might be other references to this pool.  Changed to use
      unreference_addresspool.
    
    - free_addresspool didn't unlink the pool from the pluto_pools list.
      Fixed.
    
    - free_addresspool_entry had a number of problems.  Deleted.  Use
      other functions in its place (free_addresspool,
      unreference_addresspool).
    
      + free_addresspool_entry was misnamed.  If the pool had a
        refcount greater than one, it didn't actually delete the pool.
        A better name would have been unreference_addresspool, but we
        already have one of them.
    
      + free_addresspool_entry's return result was hard for some callers
        honour.  It was supposed to overwrite the list's pointer to the
        old pool (Either in preceding pool's next pointer, or the list
        head).  Caller's like the one in connection.c had no easy way of
        doing that.
    
      + free_addresspool_entry, even when it didn't delete the entry, did
        unlink it from the pools list (assuming that the caller properly
        used the return value (see above)).  This is not correct.
    
      + free_addresspool_entry had a serious bug.  If the pool had a
        refcount greater than one, it didn't actually delete the pool
        (contrary to what the name suggests).  Furthermore, even if it
        didn't delete the entry, it did unlink it from the pools list
        (assuming that the caller properly used the return value (see
        above)).
    
    - reference_addresspool's result was never used.  Change it to return
      void.
    
    - partial rewrite of rel_lease_addr:
    
      + rename abuf* to make their contents manifest
    
      + use properties of unsigned arithmetic to make range
        comparison simpler.
    
    - changes to get_addr_lease trying to make it more understandable.
    
    - changes to find_addresspool trying to make it more understandable.
      Now detect inexact range overlaps, which should be banned.
    
    - changes to install_addresspool trying to make it more
      understandable.
    
    - Added more checking to install_addresspool



More information about the Swan-commit mailing list