GSUP: Add support for RAND in SendAuthInfo.req

In the autentication re-sync case, we need not only the AUTS from
the MS/UE, but also the RAND that we sent as part of the failed
authentication challenge.
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 244c5fa..3697958 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -236,7 +236,6 @@
 		case OSMO_GSUP_IMSI_IE:
 		case OSMO_GSUP_PDP_TYPE_IE:
 		case OSMO_GSUP_ACCESS_POINT_NAME_IE:
-		case OSMO_GSUP_RAND_IE:
 		case OSMO_GSUP_SRES_IE:
 		case OSMO_GSUP_KC_IE:
 			LOGP(DLGSUP, LOGL_NOTICE,
@@ -319,6 +318,15 @@
 			gsup_msg->auts = value;
 			break;
 
+		case OSMO_GSUP_RAND_IE:
+			if (value_len != 16) {
+				LOGP(DLGSUP, LOGL_ERROR,
+					"RAND length != 16 received\n");
+				return -GMM_CAUSE_COND_IE_ERR;
+			}
+			gsup_msg->rand = value;
+			break;
+
 		case OSMO_GSUP_MSISDN_IE:
 			gsup_msg->msisdn_enc = value;
 			gsup_msg->msisdn_enc_len = value_len;
@@ -474,6 +482,9 @@
 	if (gsup_msg->auts)
 		msgb_tlv_put(msg, OSMO_GSUP_AUTS_IE, 16, gsup_msg->auts);
 
+	if (gsup_msg->rand)
+		msgb_tlv_put(msg, OSMO_GSUP_RAND_IE, 16, gsup_msg->rand);
+
 	if (gsup_msg->cn_domain) {
 		uint8_t dn = gsup_msg->cn_domain;
 		msgb_tlv_put(msg, OSMO_GSUP_CN_DOMAIN_IE, 1, &dn);