Browse Source

core: sip_msg_shm_clone: clone parsed maxforwards value in shm

maxfwd module modified the msg buf directly instead of adding a lump. In
addition it is filling the parsed value of the header field.

Clone this field into shm so later code can at least determine if the msg
has been mangled so it can retreive the original value of the header.
Alex Hermann 11 years ago
parent
commit
42f506c080
1 changed files with 1 additions and 0 deletions
  1. 1 0
      sip_msg_clone.c

+ 1 - 0
sip_msg_clone.c

@@ -743,6 +743,7 @@ struct sip_msg*  sip_msg_shm_clone( struct sip_msg *org_msg, int *sip_msg_len,
 		case HDR_MAXFORWARDS_T:
 		case HDR_MAXFORWARDS_T:
 			if (!HOOK_SET(maxforwards)) {
 			if (!HOOK_SET(maxforwards)) {
 				new_msg->maxforwards = new_hdr;
 				new_msg->maxforwards = new_hdr;
+				new_msg->maxforwards->parsed = hdr->parsed;
 			}
 			}
 			break;
 			break;
 		case HDR_ROUTE_T:
 		case HDR_ROUTE_T: