OK, but that doesn't answer the question. Are the laws constitutional, and if so, why?
They're constitutional as of the time they were passed, but are perhaps now in need of updating.
DOMA, for example, does not infringe on any constitutionally protected right because marriage is not a right afforded or denied by the federal constitution. However, since per the 10th Amendment marriage is a state right, I submit that DOMA may be unconstitutional if it infringes on a state's ability to decide the issue for itself. Likewise, any federal mandate to allow same-sex marriage would be unconstitutional as well.
As for DADT, that is a pro-gay rights policy. DADT could only be unconstitutional if the Constitution prohibited gays from serving. Before DADT, gays were completely barred from military service. DADT gave them the ability to serve in silence and opened the door for us to now take the next step and allow gays to serve openly. If it weren't for DADT, we probably would not be discussing the likely possibility of gays serving openly in the next few years.
Also, something being related to national security doesn't insulate it from constitutional scrutiny. Particularly if the policy has no impact on national security at all, as is the case with DADT.
People like to mix DADT and DOMA under the umbrella of
"gay rights". While the 2 policies may share that general theme, simply labeling them both "
gay rights" issues washes away the important distinction. One might be strongly against gay marriage for a religious reason while strongly in support for gays serving openly for the sake of a strong military. In so far as I can see you wouldn't oppose gays in the military for religious reasons nor would you support gay marriage so the military was strong. Each position is supported by very different facts and lines of logic.
If such a person were against gay marriage and in support of gays serving openly, then we couldn't say with any degree of accuracy that this person is "
for gay rights" or
"against gay rights". Such ambiguity is another reason why the "
rights" argument fails every time it's tried.