Print this page
Current snapshot of OpenSolaris port.
Checkpoint
Checkpoint
Merge from parent.
Merge with WIDE update.
Pull from WIDE.
Pull from WIDE.
Checkpoint
Re-update.
blah
WIDE update
Update from WIDE.

Split Close
Expand all
Collapse all
          --- old/iked/ike_conf.c
          +++ new/iked/ike_conf.c
↓ open down ↓ 3258 lines elided ↑ open up ↑
3259 3259          struct rcpfk_msg param;
3260 3260          struct prop_pair *proto;
3261 3261          int i;
3262 3262          int err;
3263 3263          static int header_order[] = {
3264 3264                  IKEV2PROPOSAL_AH,
3265 3265                  IKEV2PROPOSAL_ESP
3266 3266          };
3267 3267          const int BITS = 8;
3268 3268  
     3269 +        (void) memset(&param, 0, sizeof (param));
3269 3270          /*
3270 3271           * param fields assigned here:
3271 3272           * seq, samode, (reqid,) ul_proto,
3272 3273           * spi, satype, enctype, enckey, enckeylen, authtype, authkey, authkeylen,
3273 3274           *
3274 3275           * not assigned here (apply_func need to assign them if necessary):
3275 3276           * sa_src, pref_src, sa_dst, pref_dst, 
3276 3277           * so, wsize, saflags, lft_hard_time, lft_hard_bytes, lft_soft_time, lft_soft_bytes
3277 3278           */
3278 3279  
↓ open down ↓ 996 lines elided ↑ open up ↑
4275 4276          struct sockaddr *addr;
4276 4277  
4277 4278          if (!config_ipaddr)
4278 4279                  return actual_addr;
4279 4280  
4280 4281          switch (config_ipaddr->type) {
4281 4282          case RCT_ADDR_INET:
4282 4283                  memcpy(ss, config_ipaddr->a.ipaddr,
4283 4284                         SOCKADDR_LEN(config_ipaddr->a.ipaddr));
4284 4285                  addr = (struct sockaddr *)ss;
     4286 +#ifdef sun
     4287 +                /*
     4288 +                 * XXX KEBE SAYS we need the port from the "policy".  This, of
     4289 +                 * course, goes to hell when we introduce tunnel- mode into
     4290 +                 * the mix, and config_ipaddr is != actual_addr.  The IKEv1
     4291 +                 * callers of this are restricted to ikev1/pfkey.c, and the
     4292 +                 * IKEv2 callers are restricted to ikev2_child.c.  Hopefully
     4293 +                 * those callers can account for tunnel-mode or
     4294 +                 * transport-mode.  :)
     4295 +                 */
     4296 +#else
4285 4297                  if (!set_port(addr, extract_port(actual_addr))) {
4286 4298                          plog(PLOG_INTERR, PLOGLOC, 0, "set_port failed\n");
4287 4299                          return NULL;
4288 4300                  }
     4301 +#endif
4289 4302                  break;
4290 4303  
4291 4304          case RCT_ADDR_MACRO:
4292 4305                  if (rcs_is_addr_rw(config_ipaddr))
4293 4306                          return actual_addr;
4294 4307  
4295 4308                  if (rcs_getaddrlistbymacro(config_ipaddr->a.vstr,
4296 4309                                             &addrlist) != 0) {
4297 4310                          plog(PLOG_INTERR, PLOGLOC, 0,
4298 4311                               "macro %.*s expansion failure\n",
↓ open down ↓ 3 lines elided ↑ open up ↑
4302 4315                  }
4303 4316                  if (addrlist->next)
4304 4317                          plog(PLOG_INTWARN, PLOGLOC, 0,
4305 4318                               "macro expands to multiple addresses, "
4306 4319                               "only the first one is used.\n");
4307 4320  
4308 4321                  memcpy(ss, addrlist->a.ipaddr,
4309 4322                         SOCKADDR_LEN(addrlist->a.ipaddr));
4310 4323                  rcs_free_addrlist(addrlist);
4311 4324                  addr = (struct sockaddr *)ss;
     4325 +#ifdef sun
     4326 +                /*
     4327 +                 * XXX KEBE SAYS we need the port from the "policy".  This, of
     4328 +                 * course, goes to hell when we introduce tunnel- mode into
     4329 +                 * the mix, and config_ipaddr is != actual_addr.  The IKEv1
     4330 +                 * callers of this are restricted to ikev1/pfkey.c, and the
     4331 +                 * IKEv2 callers are restricted to ikev2_child.c.  Hopefully
     4332 +                 * those callers can account for tunnel-mode or
     4333 +                 * transport-mode.  :)
     4334 +                 */
     4335 +#else
4312 4336                  if (!set_port(addr, extract_port(actual_addr))) {
4313 4337                          plog(PLOG_INTERR, PLOGLOC, 0, "set_port failed\n");
4314 4338                          return NULL;
4315 4339                  }
     4340 +#endif
4316 4341                  break;
4317      -
4318 4342          default:
4319 4343                  plog(PLOG_INTERR, PLOGLOC, 0,
4320 4344                       "my_sa_ipaddr or peers_sa_ipaddr is "
4321 4345                       "unsupported address type (type %s)\n",
4322 4346                       rct2str(config_ipaddr->type));
4323 4347                  return NULL;
4324 4348          }
4325 4349  
4326 4350          return addr;
4327 4351  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX