Change the definition of struct if_data's member ifi_epoch from wall
clock time to uptime because wall clock time may go backwards. This is a change in the API which will impact SNMP agents who are using ifi_epoch to set RFC2233's ifCounterDiscontinuityTime. None are know to exist today. This will not impact applications that are using the <index, epoch> tuple to verify interface uniqueness except that it eliminates a race which could lead to a false assumption of uniqueness. Because this is a behavior change, bump __FreeBSD_version. Discussed with: re (jhb, scottl) MFC after: 3 days Pointed out by: pkh (way back at EuroBSDCon) Pointy hat: brooks
This commit is contained in:
parent
960f641e6d
commit
bc9d299133
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142501
8
UPDATING
8
UPDATING
@ -21,6 +21,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 6.x IS SLOW:
|
|||||||
developers choose to disable these features on build machines
|
developers choose to disable these features on build machines
|
||||||
to maximize performance.
|
to maximize performance.
|
||||||
|
|
||||||
|
20050225:
|
||||||
|
The ifi_epoch member of struct if_data has been changed to
|
||||||
|
contain the uptime at which the interface was created or the
|
||||||
|
statistics zeroed rather then the wall clock time because
|
||||||
|
wallclock time may go backwards. This should have no impact
|
||||||
|
unless an snmp implementation is using this value (I know of
|
||||||
|
none at this point.)
|
||||||
|
|
||||||
20050223:
|
20050223:
|
||||||
The layout of struct image_params has changed. You have to
|
The layout of struct image_params has changed. You have to
|
||||||
recompile all compatibility modules (linux, svr4, etc) for use
|
recompile all compatibility modules (linux, svr4, etc) for use
|
||||||
|
@ -729,7 +729,7 @@ the current value of
|
|||||||
.Va if_capenable .
|
.Va if_capenable .
|
||||||
.It ifi_epoch
|
.It ifi_epoch
|
||||||
.Pq Vt time_t
|
.Pq Vt time_t
|
||||||
The time the interface was attached or the last time the statistics
|
The system uptime when interface was attached or the statistics
|
||||||
below were reset.
|
below were reset.
|
||||||
This is intended to be used to set the SNMP variable
|
This is intended to be used to set the SNMP variable
|
||||||
.Va ifCounterDiscontinuityTime .
|
.Va ifCounterDiscontinuityTime .
|
||||||
|
@ -392,7 +392,7 @@ if_attach(struct ifnet *ifp)
|
|||||||
TAILQ_INIT(&ifp->if_multiaddrs);
|
TAILQ_INIT(&ifp->if_multiaddrs);
|
||||||
knlist_init(&ifp->if_klist, NULL);
|
knlist_init(&ifp->if_klist, NULL);
|
||||||
getmicrotime(&ifp->if_lastchange);
|
getmicrotime(&ifp->if_lastchange);
|
||||||
ifp->if_data.ifi_epoch = time_second;
|
ifp->if_data.ifi_epoch = time_uptime;
|
||||||
|
|
||||||
#ifdef MAC
|
#ifdef MAC
|
||||||
mac_init_ifnet(ifp);
|
mac_init_ifnet(ifp);
|
||||||
|
@ -102,7 +102,7 @@ struct if_data {
|
|||||||
u_long ifi_iqdrops; /* dropped on input, this interface */
|
u_long ifi_iqdrops; /* dropped on input, this interface */
|
||||||
u_long ifi_noproto; /* destined for unsupported protocol */
|
u_long ifi_noproto; /* destined for unsupported protocol */
|
||||||
u_long ifi_hwassist; /* HW offload capabilities */
|
u_long ifi_hwassist; /* HW offload capabilities */
|
||||||
time_t ifi_epoch; /* time of attach or stat reset */
|
time_t ifi_epoch; /* uptime at attach or stat reset */
|
||||||
#ifdef __alpha__
|
#ifdef __alpha__
|
||||||
u_int ifi_timepad; /* time_t is int, not long on alpha */
|
u_int ifi_timepad; /* time_t is int, not long on alpha */
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
* is created, otherwise 1.
|
* is created, otherwise 1.
|
||||||
*/
|
*/
|
||||||
#undef __FreeBSD_version
|
#undef __FreeBSD_version
|
||||||
#define __FreeBSD_version 600014 /* Master, propagated to newvers */
|
#define __FreeBSD_version 600015 /* Master, propagated to newvers */
|
||||||
|
|
||||||
#ifndef LOCORE
|
#ifndef LOCORE
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user