summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-03-12 12:13:08 -0400
committerGreg Hudson <ghudson@mit.edu>2014-03-18 11:59:11 -0400
commitcb3db58b1942998a5e2c4d46c21ca0554e769a8c (patch)
tree205cfad4498d8aa5003167b5617cca9a9e3d22a9 /src/util
parent23a378046bd8122839e501b3e47bb807b66e1c03 (diff)
downloadkrb5-cb3db58b1942998a5e2c4d46c21ca0554e769a8c.tar.gz
krb5-cb3db58b1942998a5e2c4d46c21ca0554e769a8c.tar.xz
krb5-cb3db58b1942998a5e2c4d46c21ca0554e769a8c.zip
Rewrite GSS sequence state tracking code
Replace util_ordering.c with a new file util_seqstate.c, implemented using a bitmap of previously received sequence numbers instead of a 20-element circular queue. This approach has slightly different limitations--it can check for replays for values within 64 of the expected next number, where the old code could check within the range of the last 20 received numbers regardless of how far apart they are. The new approach should work as well or better for any realistic packet reordering scenario. ticket: 7879 (new)
Diffstat (limited to 'src/util')
-rw-r--r--src/util/gss-kernel-lib/Makefile.in8
-rw-r--r--src/util/gss-kernel-lib/deps4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/util/gss-kernel-lib/Makefile.in b/src/util/gss-kernel-lib/Makefile.in
index dc017d370..f70f3c655 100644
--- a/src/util/gss-kernel-lib/Makefile.in
+++ b/src/util/gss-kernel-lib/Makefile.in
@@ -22,7 +22,7 @@ SRCS= \
util_seed.c \
util_token.c \
util_set.c \
- util_ordering.c
+ util_seqstate.c
EXTRADEPSRCS= kernel_gss.c t_kgss_common.c t_kgss_user.c t_kgss_kernel.c
@@ -40,7 +40,7 @@ OBJS= \
util_seed.o \
util_token.o \
util_set.o \
- util_ordering.o
+ util_seqstate.o
# COM_ERR_DEPS is COM_ERR_DEPS-k5 when we use the bundled com_err, and
# empty otherwise. Normally COM_ERR_DEPS-k5 is from the central
@@ -138,8 +138,8 @@ util_token.c: $(GSS_GENERIC)/util_token.c
$(CP) $(GSS_GENERIC)/util_token.c $@
util_set.c: $(GSS_GENERIC)/util_set.c
$(CP) $(GSS_GENERIC)/util_set.c $@
-util_ordering.c: $(GSS_GENERIC)/util_ordering.c
- $(CP) $(GSS_GENERIC)/util_ordering.c $@
+util_seqstate.c: $(GSS_GENERIC)/util_seqstate.c
+ $(CP) $(GSS_GENERIC)/util_seqstate.c $@
# Rules to copy headers from their real homes in the source or build tree.
gssapi.h: $(INCLUDE)/gssapi.h
diff --git a/src/util/gss-kernel-lib/deps b/src/util/gss-kernel-lib/deps
index 94c60ba0a..a263ba2cb 100644
--- a/src/util/gss-kernel-lib/deps
+++ b/src/util/gss-kernel-lib/deps
@@ -89,10 +89,10 @@ $(OUTPRE)util_set.$(OBJEXT): $(COM_ERR_DEPS) autoconf.h \
gssapi/gssapi.h gssapi/gssapi_alloc.h gssapi/gssapi_ext.h \
gssapiP_generic.h gssapi_err_generic.h gssapi_generic.h \
k5-buf.h k5-platform.h k5-thread.h util_set.c
-$(OUTPRE)util_ordering.$(OBJEXT): $(COM_ERR_DEPS) autoconf.h \
+$(OUTPRE)util_seqstate.$(OBJEXT): $(COM_ERR_DEPS) autoconf.h \
gssapi/gssapi.h gssapi/gssapi_alloc.h gssapi/gssapi_ext.h \
gssapiP_generic.h gssapi_err_generic.h gssapi_generic.h \
- k5-buf.h k5-platform.h k5-thread.h util_ordering.c
+ k5-buf.h k5-platform.h k5-thread.h util_seqstate.c
$(OUTPRE)kernel_gss.$(OBJEXT): $(COM_ERR_DEPS) autoconf.h \
gssapi/gssapi.h gssapi/gssapi_alloc.h gssapi/gssapi_ext.h \
gssapi/gssapi_krb5.h gssapiP_generic.h gssapiP_krb5.h \