[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hifn(4) few small changes
- To: freebsd-hackers_(_at_)_freebsd_(_dot_)_org
- Subject: hifn(4) few small changes
- From: Patrick Lamaizière <patfbsd_(_at_)_davenulle_(_dot_)_org>
- Date: Thu, 1 Jan 2009 19:31:02 +0100
- Organization: /dave/nulle
Hello and happy new year,
I would like to suggest few changes in the hifn driver:
diff between CURRENT:
http://user.lamaiziere.net/patrick/hifn-010109/hifn-patch.txt
hifn_attach()
- Useless bzero of softc
hifn_detach()
- Return EBUSY if there is active session
- Free the sessions
- Use callout_drain() instead callout_stop()
hifn_rng()
- Remove the unused macro RANDOM_BITS
hifn_newsession()
- Add and use a rwlock to lock the sessions (sc->sc_sessions_lock).
- Remove useless bzero of the sessions (use malloc with M_ZERO)
- Use arc4rand() instead read_random()
hifn_freesession()
- Use a rwlock to lock the sessions
hifn_process()
- Use a rwlock to lock the sessions. In the current driver there is
no lock to protect the sessions in hifn_process() but the sessions
can be reallocated in hifn_newsession(). I think this is the cause of PR
kern/91407 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=kern/91407
hifn_callback()
- Use a rwlock to lock the sessions.
I've tested on a Soekris vpn 1411 (hifn 7955) with ipsec and openssl.
Regards.
(With big thanks to Mike Tancsa)
_______________________________________________
freebsd-hackers_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org