Added Packet-Original-Timestamp
authoraland <aland>
Fri, 25 Apr 2008 06:20:55 +0000 (06:20 +0000)
committeraland <aland>
Fri, 25 Apr 2008 06:20:55 +0000 (06:20 +0000)
share/dictionary.freeradius.internal
src/include/radius.h
src/main/detail.c

index 37f5d7a..c592bbb 100644 (file)
@@ -167,6 +167,7 @@ VALUE       Module-Return-Code              notfound                6
 VALUE  Module-Return-Code              noop                    7
 VALUE  Module-Return-Code              updated                 8
 
+ATTRIBUTE      Packet-Original-Timestamp               1109    date
 
 #
 #      Range:  1200-1279
index f19a007..982fdba 100644 (file)
 #define PW_CLEARTEXT_PASSWORD          1100
 #define PW_PASSWORD_WITH_HEADER                1101
 #define PW_MODULE_RETURN_CODE          1108
+#define PW_PACKET_ORIGINAL_TIMESTAMP           1109
 
 /*
  *     Integer Translations
index 7c69ac2..439484e 100644 (file)
@@ -488,6 +488,14 @@ int detail_recv(rad_listen_t *listener,
                 */
                if (!strcasecmp(key, "Timestamp")) {
                        data->timestamp = atoi(value);
+
+                       vp = paircreate(PW_PACKET_ORIGINAL_TIMESTAMP,
+                                       PW_TYPE_DATE);
+                       if (vp) {
+                               vp->vp_date = (uint32_t) data->timestamp;
+                               *tail = vp;
+                               tail = &(vp->next);
+                       }
                        continue;
                }