- 论坛徽章:
- 0
|
好奇怪的段错误啊?半天没找出来,高手帮帮小妹啊!!!
- static vchar_t *
- ident_ir2mx(iph1)
- struct ph1handle *iph1;
- {
- vchar_t *buf = 0;
- struct isakmp_gen *gen;
- char *p;
- int tlen;
- int need_cr = 0;
- vchar_t *cr = NULL;
- vchar_t *vid = NULL;
- /*by yvonne*/
- vchar_t *h_psk=NULL;
- vchar_t *hpsk=NULL;
- /*by yvonne*/
- int error = -1;
- int nptype;
- /* create buffer
- */
- tlen = sizeof(struct isakmp)
- + sizeof(*gen) + iph1->;dhpub->;l
- + sizeof(*gen) + iph1->;nonce->;l;
- #ifdef CYH
- printf("\nnext is by yvonne\n");
- #endif
- /* by yvonne */
- if(iph1->;side==INITIATOR&&iph1->;approval->;authmethod==OAKLEY_ATTR_AUTH_METHOD_PSKEY&&iph1->;etype == ISAKMP_ETYPE_IDENT)
- {
- //取psk,给hpsk赋值
- #ifdef CYH
- printf("\nbegin getpskbyaddr function");
- #endif
-
- if(NULL==(hpsk=getpskbyaddr(iph1->;remote)))
- printf("\n hpsk is NULL\n");
-
- #ifdef CYH
- printf("\n finish getpskbyaddr, begin eay_md5_one function");
- #endif
-
- iph1->;h_psk= eay_md5_one(hpsk);
-
- #ifdef CYH
- printf("end eay_md5_one function");
- #endif
-
- tlen += sizeof(*gen) + h_psk->;l;
- }
-
复制代码 |
|